I’ve having difficulty uploading files to an ftp server using FtpClient. Some of the time it works ok but most of the time it throws an FtpIOException. The file size isn’t that large (about 27kb). The server is controlled by a third party so I don’t really have much information there, except that they don’t support passive mode, but I’ve set up FtpClient to use active.
The error message is ‘An error occurred while reading from or writing to the data channel.’ and the call stack looks like:
Call Stack at Xceed.Ftp.Engine.FtpCommandSequence.EndExecute(IAsyncResult asyncResult) at Xceed.Ftp.FtpClient.SendFile(FtpCommandChannel commandChannel, SendFileFtpCommandSequence sendSequence) at Xceed.Ftp.FtpClient.SendFile(String localFilename, String remoteFilename)
Here is a listing from a trace from FtpClient:
> CWD /U999/request < 250 CWD command successful. > TYPE I < 200 Type set to I. > PORT 10,25,44,111,15,221 < 200 PORT command successful. > STOR DD4999.req < 150 Opening BINARY mode data connection for DD4999.req. Data connection established with 18.104.22.1682:20 on 29/05/2009 @ 09:10:29 < 226 Transfer complete.
The code to do this is basic, just creating a new FtpClient, setting passive to false, changing the CWD, and then trying to send the file.
I’m using version 2.0.4579.0
Any help would be greatly appreciated
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by THomas (had 1988 views)
Some numerous bugs that could be linked to this issue have been fixed between the version 2.0 and the current version 4.0 of the Xceed FTP for .NET product. We suggest you to upgrade to the latest dlls (http://xceed.com/FTP_NET_Intro.html).
Applies to Xceed FTP for .NET. Imported from legacy forums. Posted by Mohamed [Xceed] (had 1126 views)