I've recently started to use edtFTPnet and, generally, it works very well. The problem I'm seeing seems to have been noted in some of the forum topics but I haven't really seen a resolution for this.
When I upload a small file (about 12KB), the UploadFile method returns after uploading the file to the FTP server and I am able to terminate my application properly. When I upload a 10MB file, the file uploads successfully (in less than 2 minutes) but doesn't return from the UploadFile method until the time out value is reached. At this point, I receive a exception:
ERROR [FTPControlSocket] 13 Feb 2011 17:36:13.484 : Read failed ('' read so far)
WARN [FTPClient] 13 Feb 2011 17:36:13.484 : ReadReply failed
WARN [FTPClient] 13 Feb 2011 17:36:13.484 : EnterpriseDT.Net.Ftp.ControlChannelIOException: Unable to read data from the transport 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.
WARN [FTPClient] 13 Feb 2011 17:36:13.484 : at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadLine()
WARN [FTPClient] 13 Feb 2011 17:36:13.484 : at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
WARN [FTPClient] 13 Feb 2011 17:36:13.484 : at EnterpriseDT.Net.Ftp.FTPClient.ValidateTransfer()
This behavior is very consistent. One thing I notice is that I never receive a 226 Transfer Complete message.
The server I'm connecting to is running IIS6 on Windows Server 2003.
FileZilla has no problems making a connection to the same file, sending the same file and consistently terminating correctly.
Here's what I see in the FTP log:
DEBUG [FTPClient] 13 Feb 2011 19:03:48.750 : Connecting to ftp.reuniondb.com:21
DEBUG [HostNameResolver] 13 Feb 2011 19:03:48.765 : Resolving ftp.reuniondb.com
DEBUG [HostNameResolver] 13 Feb 2011 19:03:48.859 : ftp.reuniondb.com resolved to 69.2.205.51
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:48.859 : Setting socket timeout=1200000
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:48.859 : Command encoding=System.Text.ASCIIEncoding
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:48.859 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:49.140 : 220-Microsoft FTP Service
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:49.453 : 220 ReunionDB FTP Site
DEBUG [FTPConnection] 13 Feb 2011 19:03:49.453 : Connected to ftp.reuniondb.com (instance=0)
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:49.453 : ---> USER svc_gr
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:49.625 : 331 Password required for svc_gr.
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:49.625 : ---> PASS ********
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:49.781 : 230-Welcome to ReunionDB FTP Site
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.046 : 230 User svc_gr logged in.
DEBUG [FTPConnection] 13 Feb 2011 19:03:50.046 : Successfully logged in
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.062 : ---> TYPE I
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.203 : 200 Type set to I.
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.203 : ---> PWD
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.375 : 257 "/" is current directory.
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.375 : ---> CWD gr/test
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.531 : 250 CWD command successful.
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.531 : ---> PWD
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.718 : 257 "/gr/test" is current directory.
DEBUG [FTPConnection] 13 Feb 2011 19:03:50.718 : UploadFile(C:\Temp\GRI Data\DIY Files\test.7z,test.7z,False)
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.718 : ---> PASV
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.906 : 227 Entering Passive Mode (69,2,205,51,19,137).
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.906 : Server supplied address=69.2.205.51
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.906 : Server supplied port=5001
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.906 : autoPassiveIPSubstitution=True
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.906 : remoteAddr=69.2.205.51
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.906 : Substituting server supplied IP (69.2.205.51) with remote host IP (69.2.205.51)
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:50.906 : NewPassiveDataSocket(69.2.205.51,5001)
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:51.062 : ---> STOR test.7z
DEBUG [FTPControlSocket] 13 Feb 2011 19:03:51.218 : 125 Data connection already open; Transfer starting.
DEBUG [FTPClient] 13 Feb 2011 19:06:46.781 : Closing source stream
DEBUG [FTPClient] 13 Feb 2011 19:06:46.875 : Transferred 9304250 bytes to remote host
I am using version 2.2.1 of edtFTPnet. Capturing network traffic with Wireshark also indicates the same behavior above and proper behavior using FileZilla.
Do you have any ideas or suggestions?
Thanks,
Jim