Closed ontytoom closed 8 years ago
The following is the first exception is caught by the calling code:
An unhandled exception of type 'ArxOne.Ftp.Exceptions.FtpProtocolException' occurred in ArxOne.Ftp.dll
Additional information: Expected other reply than 214 ('test')
This was tested using Xlight FTP server (http://www.xlightftpd.com/) running locally on my Windows laptop.
FtpClient ftp = new FtpClient( FtpProtocol.Ftp, "localhost", 21, new System.Net.NetworkCredential( "someuser", "somepasswd" ) );
for ( int i = 0; i < 100; i++ )
{
IEnumerable<FtpEntry> list;
try
{
list = ftp.ListEntries( "/" );
DebugPrintln( list.ToArray().Count().ToString() );
}
catch ( Exception ex )
{
DebugPrintln( ex.Message );
}
}
(DebugPrintln is any reporting function of your choice.)
While this code is looping, I used the FTP server "send broadcast message" function and sent message "test".
It appears that the 214 reply code is the answer to a HELP command. I couldn't find any specification regarding this. Do you have some documentation about this?
Hello, unfortunately I do not. I have merely noticed that once the this happens, my FTP client keeps receiving errors and I don't seem to have a way to fix that.
Do you have any suggested way to reset the connection one this occurs?
Is there any function I can call in order to reset connection?
Thank you :-)
I downloaded xlight ftp, but I can't find where is this broadcast option (I downloaded the standalone version).
Found it! I'm investigating :thought_balloon:
It can't be solved directly, because it creates a shift between commands and replies. So the only way is to invalidate the session. I'm currently searching for an elegant way to do this without the need to expose the FtpSession
. Hang tight :wink:
Fixed in 1.8.
Thank you kindly :-)
The errors that appear as as follows (first few lines are normal output, but then errors appear once the message was sent by the server):