0 votes
by (120 points)
edited

I am getting this error while download multiple files from ftp server. Can you please let me know what needs to be done for this.

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (144k points)
edited

Usually, this error indicates that a directory being transfered or one of its subdirectories was deleted while the PutFiles or GetFiles was in progress.

However, from the communication log you sent to support@rebex.net, this appears to be caused by a duplicit "226 Transfer finished successfully" response sent by the FTP server. Two identical responses instead of one confused the MLST command that was used to determine whether a directory to be transfered still exisst. We have not encountered this before - do you know which FTP server is this?

Enabling an option that causes the FTP control connection to be flushed before sending each command should help:

C#:

client.Options |= FtpOptions.EnableControlConnectionFlushing;

VB.NET:

client.Options = client.Options Or FtpOptions.EnableControlConnectionFlushing

(where "client" is an instance of Ftp object)

This should solve the issue.

Note: It looks like this option has a side effect that causes a noticeable slowdown of the FTP control connection. We will try addressing this in the next release. (If you would like a beta when it's ready, please let us know.)

...