This commit is contained in:
2023-01-03 16:03:15 +01:00
parent 75df258abf
commit b33720c61e
56 changed files with 132 additions and 106 deletions

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.7.0.0")>
<Assembly: AssemblyFileVersion("1.7.0.0")>
<Assembly: AssemblyVersion("1.9.0.0")>
<Assembly: AssemblyFileVersion("1.9.0.0")>

View File

@@ -22,7 +22,7 @@ Namespace My.Resources
'''<summary>
''' Eine stark typisierte Ressourcenklasse zum Suchen von lokalisierten Zeichenfolgen usw.
'''</summary>
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0"), _
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase

View File

@@ -476,32 +476,31 @@ Public Class Windream
' If username, password and domain are set, login with impersonation
' Else, login with current credentials
oImpersonation = False
If UserName IsNot Nothing And Password IsNot Nothing And Domain IsNot Nothing Then
oImpersonation = True
oCredentials = New WMUserIdentity() With {
.aServerName = ServerName,
.aUserName = UserName,
.aPassword = Password,
.aDomain = Domain
}
If UserName <> String.Empty And Password <> String.Empty And Domain <> String.Empty Then
oImpersonation = True
_logger.Info("Impersonated Login: {0}", oImpersonation)
_logger.Info("Username: {0}", IIf(UserName IsNot Nothing, UserName, Environment.UserName))
_logger.Info("Domain: {0}", IIf(Domain IsNot Nothing, Domain, Environment.UserDomainName))
oCredentials = New WMUserIdentity() With {
.aServerName = ServerName,
.aUserName = UserName,
.aPassword = Password,
.aDomain = Domain
}
oConnect.ModuleId = 9
Else
oImpersonation = False
oConnect.ModuleId = 9
End If
End If
If oImpersonation = False Then
oCredentials = New WMUserIdentity() With {
.aServerName = ServerName
}
End If
If UserName IsNot Nothing Then
If UserName <> String.Empty Then
_logger.Info("Impersonated Login: {0}", oImpersonation)
_logger.Info("Username: {0}", IIf(UserName IsNot Nothing, UserName, Environment.UserName))
_logger.Info("Domain: {0}", IIf(Domain IsNot Nothing, Domain, Environment.UserDomainName))
End If
End If
Try
_logger.Debug("Trying to create a session...")
oSession = oConnect.Login(oCredentials)
_logger.Info("Connected..Session created")
Catch ex As Exception

View File

@@ -10,7 +10,8 @@
<AssemblyName>DigitalData.Modules.Windream</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
@@ -97,6 +98,7 @@
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<Compile Include="My Project\Resources.Designer.vb">
<AutoGen>True</AutoGen>