Hi all,
We're uploading several csv files to a remote server that requires active transfer mode. I've also tested this with our FTP server; passive mode works but active mode fails with this error message:
Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
It seems the Port command never reaches the remote host. In the log, his is what is sent just before the error (IP masked for obvious reasons):
FTP command sent: ---> PORT XXX,XX,XX,XXX,9,222
I've also tested both modes manually with FileZilla and can transfer in either mode successfully. I can't understand the problem.
The code (VB.NET) used to set up & perform the transfer is (called in the order it appears):
FTPConn.ServerAddress = FTPServerURI
FTPConn.ServerPort = FTPPort
FTPConn.Timeout = 300000
FTPConn.AutoLogin = False
FTPConn.UserName = FTPUserName
FTPConn.Password = FTPPassword
FTPConn.Connect()
FTPConn.Login()
FTPConn.ConnectMode = EnterpriseDT.Net.Ftp.FTPConnectMode.ACTIVE
FTPConn.TransferType = EnterpriseDT.Net.Ftp.FTPTransferType.ASCII
FTPUpload(CSVFilePath & AttendanceCSVFileName, FTPPath & AttendanceCSVFileName)
All the variables being assigned have valid values.
I'm stumped, any help is greatly appreciated
Thanks