We'll need to see the log file at Debug level. Transfers are validated like this:
string code = reply.ReplyCode;
if ((code.Equals("426") || code.Equals("450")) && !cancelTransfer)
throw new FTPException(reply);
So an exception should be thrown here if you have not called CancelTransfer().
I do not know what kind of debug information you like?
But you are welcome to test it your self!
1) Download:
http://www.pablosoftwaresolutions.com/download.php?id=7 (ftpserver3lite.zip)
Configure it to 1 minute timeout, set up user and password
2) Using code in a .Net Projekt with your current libs:
The servers trace is:
private void button1_Click(object sender, EventArgs e)
{
FTPConnection c = new FTPConnection();
c.ServerAddress = "127.0.0.1";
c.UserName = "testo";
c.Password = "testo";
c.Closed += new FTPConnectionEventHandler(c_Closed);
c.Connect();
System.Diagnostics.Debug.WriteLine("Connected");
}
void c_Closed(object sender, FTPConnectionEventArgs e)
{
System.Diagnostics.Debug.WriteLine("Connection timed out");
}
c_Closed never gets thrown.
13:47:30.030 [1536] Client connected from 127.0.0.1.
13:47:30.061 [1536] 220 Welcome to Quick 'n Easy FTP Server
13:47:30.061 [1536] USER testo
13:47:30.061 [1536] 331 Password required for testo
13:47:30.061 [1536] PASS *****
13:47:30.077 [1536] 230 User successfully logged in.
13:47:30.077 [1536] TYPE I
13:47:30.077 [1536] 200 Type set to BINARY
13:47:30.077 [1536] PWD
13:47:30.093 [1536] 257 "/" is current directory.
13:47:30.093 [1536] CWD /
13:47:30.093 [1536] 250 "/" is current directory.
13:47:30.093 [1536] PWD
13:47:30.108 [1536] 257 "/" is current directory.
13:48:31.061 [1536] Client disconnected from 127.0.0.1.
13:48:31.061 [1536] 426 Connection timed out, aborting transfer
I've got an additional question: Why do you do PWD, CWD, PWD after a fresh connection?
Regards.