FTP I/O error when trying to send file

FTP I/O error when trying to send file

Hi there,

I’m using the Xceed.ftp .Net component to send a file to a remote ftp server.
This is an intranet applications, so the connection to the ftp server does not have to be secure.

This is how my code looks like:

ftp = new Xceed.Ftp.FtpClient();
http://ftp.Connect(“server.ftp.com”, 21);
http://ftp.Login(“username”, “password”);

fs = new FileStream(“C:\local.zip”, FileMode.Open, FileAccess.Read, FileShare.Read);
http://ftp.SendFile(fs, “Upload_33.zip”);

I managed to logged in just fine and get connected to the ftp server, but every time it hit the point when it’s trying to send the file – it will paused and then throw this error:

“An I/O error occurred while accepting the FTP server’s data connection.

A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond Error executing task IOOC Export.FTP upload zip file.

I checked the ftp server and there’s a file named “Upload_33.zip” with size = 0 bytes… I guess somehow this ftp connection is dropped ?
can anybody help?

________________________________________________________

One extra note:
If connect to the FTP server manually and upload a file manually – everything works solid