Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
2.2k views
in .NET FTP by (200 points)
We are having a problem with .Net Thread abort errors

Sometimes our, code using the product, transfers successfully and sometimes we get a Thread Abort error, due to the connection closing
Below is the log file for transferring a file that work and the entry when the FTP failed

I posted the issue on the support Forum but have not heard back

Can we set a timeout higher
we will be downloading the new version of the product in order to transfer whole directories and cut down on the number of times we need to connect.
What should we be doing differently?

LOG example:
----------------------------------------------------------------------------

DEBUG [RecursiveOperations] 24 Dec 2007 12:30:44.453 : GetFile(D:\Inetpub\eCaseLink\Probuild ASP.NET 2.0\VSSTemp\GW01-0702\images,CrfReportsOn.GIF)
DEBUG [ExFTPControlSocket] 24 Dec 2007 12:30:44.453 : NewActiveDataSocket(0)
DEBUG [ExFTPControlSocket] 24 Dec 2007 12:30:44.453 : Binding 192.168.253.23
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.468 : ---> PORT 192,168,253,23,7,96
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.484 : 200 PORT command successful.
DEBUG [ExFTPActiveDataSocket] 24 Dec 2007 12:30:44.484 : Created active data-socket: SocksConnector=
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.484 : ---> RETR CrfReportsOn.GIF
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.500 : 150 Opening BINARY mode data connection for CrfReportsOn.GIF(528 bytes).
DEBUG [ExFTPActiveDataSocket] 24 Dec 2007 12:30:44.500 : Awaiting a direct connection on active data-channel.
DEBUG [ExFTPActiveDataSocket] 24 Dec 2007 12:30:44.515 : Direct connection on active data-channel established.
DEBUG [FTPClient] 24 Dec 2007 12:30:44.515 : Transferred 528 bytes from remote host
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.578 : 226 Transfer complete.
DEBUG [RecursiveOperations] 24 Dec 2007 12:30:44.578 : GetFile(D:\Inetpub\eCaseLink\Probuild ASP.NET 2.0\VSSTemp\GW01-0702\images,CrfReportsOnClick.GIF)
DEBUG [ExFTPControlSocket] 24 Dec 2007 12:30:44.578 : NewActiveDataSocket(0)
DEBUG [ExFTPControlSocket] 24 Dec 2007 12:30:44.578 : Binding 192.168.253.23
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.578 : ---> PORT 192,168,253,23,7,97
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.593 : 200 PORT command successful.
DEBUG [ExFTPActiveDataSocket] 24 Dec 2007 12:30:44.593 : Created active data-socket: SocksConnector=
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.593 : ---> RETR CrfReportsOnClick.GIF
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.609 : 150 Opening BINARY mode data connection for CrfReportsOnClick.GIF(531 bytes).
DEBUG [ExFTPActiveDataSocket] 24 Dec 2007 12:30:44.609 : Awaiting a direct connection on active data-channel.
DEBUG [ExFTPActiveDataSocket] 24 Dec 2007 12:30:44.625 : Direct connection on active data-channel established.
DEBUG [FTPClient] 24 Dec 2007 12:30:44.625 : Transferred 531 bytes from remote host
DEBUG [FTPControlSocket] 24 Dec 2007 12:30:44.625 : 421 Terminating connection.
INFO [FTPControlSocket] 24 Dec 2007 12:30:44.625 : Expected reply codes = [225,226,250,426,450]
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection] 24 Dec 2007 12:31:14.905 : KeepAlive - testing connection
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection] 24 Dec 2007 12:31:14.905 : Testing connection
DEBUG [FTPControlSocket] 24 Dec 2007 12:31:14.905 : ---> PWD
ERROR [EnterpriseDT.Net.Ftp.ExFTPConnection] 24 Dec 2007 12:31:14.905 : Command error : System.SystemException: Unexpected null reply received
System.SystemException: Unexpected null reply received
at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
ERROR [EnterpriseDT.Net.Ftp.ExFTPConnection] 24 Dec 2007 12:31:14.905 : Connection test failed. Closing... : System.SystemException: Unexpected null reply received
System.SystemException: Unexpected null reply received
at EnterpriseDT.Net.Ftp.FTPControlSocket.ReadReply()
at EnterpriseDT.Net.Ftp.FTPControlSocket.SendCommand(String command)
at EnterpriseDT.Net.Ftp.FTPClient.Pwd()
at EnterpriseDT.Net.Ftp.ExFTPConnection.a()
DEBUG [AsyncProcessor] 24 Dec 2007 12:31:14.905 : Stopping FTP task processor.
DEBUG [AsyncProcessor] 24 Dec 2007 12:31:14.905 : FTP task processor stopped.
DEBUG [EnterpriseDT.Net.Ftp.ExFTPConnection] 24 Dec 2007 12:31:15.405 : KeepAlive thread finished.

1 Answer

0 votes
by (162k points)
We actually replied to your email last week re this problem. The server is terminating your connection with "421 Terminating connection". Set

ftp.StrictReplyCodes = true;

and you'll get an FTPException thrown. You will need to look at the server logs to determine why you are being abruptly disconnected - it doesn't look like a timeout.

Categories

...