I am trying to connect to a FTP server using UserName, Password and Domain. But this Fails with the error "{"530 Login incorrect." & vbCrLf} System.Exception". Below is my code:
Dim ConnectionURLString As String = "ftp://ftp.xxxxxx.com"
Dim RemotePathString As String = "ftp://ftp.xxxxxx.com"
Dim UserNameString As String = "username"
Dim PasswordString As String = "password"
Dim request As FtpWebRequest = DirectCast(WebRequest.Create(RemotePathString), FtpWebRequest)
request.Method = WebRequestMethods.Ftp.ListDirectoryDetails
request.Credentials = New NetworkCredential(UserNameString, PasswordString, ConnectionURLString)
request.UsePassive = True
request.UseBinary = True
request.EnableSsl = False
Dim response As FtpWebResponse = DirectCast(request.GetResponse(), FtpWebResponse)
When I structure the Request.Credentials without the Domain (ConnectionURLString), the connection does not fail. How do I use the domain correctly to connect to the FTP server?