Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
21.8k views
in .NET FTP by (320 points)
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

18 Answers

0 votes
by (320 points)
Bruce,

Yes, I was setting that property. Could you please mask the IP addresses in your post?

Thanks
0 votes
by (161k points)
IPs masked, sorry.

Setting PublicIPAddress to the 150.xxx.xxx.xxx is causing the problem - the server can't connect to that address.
0 votes
by (220 points)
Hello,
I have the same problem.
My application works on my machine but when I install it to server I have this message :

-----> Hotelbeds :GetFtpArchiveStream ERR : EnterpriseDT.Net.Ftp.ControlChannelIOException: Impossible de lire les donn
0 votes
by (161k points)
Could you translate the error message to English for us?
0 votes
by (220 points)
it is exactly same message as the previous post?

"Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host. "

thanks

aykut
0 votes
by (51.2k points)
Could you please post a log (DEBUG level). That should help us diagnose the problem.

- Hans (EnterpriseDT)
0 votes
by (220 points)
[4304] -----> :GetFtpArchiveStream ERR : EnterpriseDT.Net.Ftp.ControlChannelIOException: Impossible de lire les donn
0 votes
by (161k points)
That's a stack trace, not a log file. Take a look at the documentation.

Categories

...