I am trying to use the edtFTPnetFree library to upload files to a EDI server. I am getting the following error:
"The requested name is valid, but no data of the requested type was found."
Here is the code I am using:
Try
'connect to ftp server
Dim ftp As New FTPConnection
ftp.ServerAddress = ediServer
ftp.UserName = login
ftp.Password = password
ftp.Protocol = FileTransferProtocol.FTP
ftp.ConnectMode = FTPConnectMode.PASV
ftp.Connect()
ftp.TransferType = FTPTransferType.ASCII
'upload a file
ftp.UploadFile("D:\MOTION_810_504450_20110810114758.xml", "test.xml")
'close the connection
ftp.Close()
Catch ex As Exception
MessageBox.Show(ex.Message.ToString())
End Try
Note that I can upload fine using the .Net FtpWebRequest class. Any help would be appreciated. Thanks...