Please assist. I get error msg "Logon Failure : Unknown user name or bad password" but the credentials I have supplied are correct
code:
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim strdomainname, strusername, strpassword, strremoteServerName As String
Dim password As New Security.SecureString
Dim command As New Process
strremoteServerName = "196.10.15.151"
strusername = "secretftp"
strpassword = "secptptf"
strdomainname = ftp.mansk.co.za
For Each strchar As Char In strpassword.ToCharArray
password.AppendChar(strchar)
Next
Dim impersonator As New AliasAccount(strusername, strpassword)
command.StartInfo.FileName = "201210091530_3618.txt"
command.StartInfo.Arguments = "\\" & strremoteServerName & "\Minnes\done"
command.StartInfo.UserName = strusername
command.StartInfo.Password = password
command.StartInfo.Domain = strdomainname
command.StartInfo.Verb = "open"
command.StartInfo.UseShellExecute = False
impersonator.BeginImpersonation()
command.Start()
impersonator.EndImpersonation()
End sub

New Topic/Question
Reply




MultiQuote



|