Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
10k views
in .NET FTP by (280 points)
I am having an issue using dtFTPnetPro connecting to a FTPS site using FTPS Explicit and Passive mode. When I use an external client ( Core Ftp ), it connects and runs just fine, but it takes about 45 seconds to connect. I can't change this since this is a clients FTP server that I have no access on.

I can do the initial connect and handshake just fine, but when I try to open the data connection to do a file list, it times out after 20 or so seconds, regardless of what the Timeout property is set to. Is there something I'm missing, or does the timeout property just not work?

Here is an example log file of what is happening. As you can see, even though timeout is set to 60000, it starts to connect for data transfer at 15:36:04.069, and throws a timeout at 15:36:25.067, which is only 20 or so seconds later, not the 60 specified in timeout.

DEBUG [SFTPMessageStore] 19 Oct 2010 15:35:48.313 : Set timeout=60000
INFO [LicenseProperties] 19 Oct 2010 15:35:48.404 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 19 Oct 2010 15:35:48.405 : Production license
DEBUG [FTPConnection] 19 Oct 2010 15:35:48.408 : Set LocalDirectory='C:\Personal\Jfarmer\FTPTest\bin\Debug'
DEBUG [SecureFTPConnection] 19 Oct 2010 15:35:48.411 : Set LocalDirectory to C:\Personal\Jfarmer\FTPTest\bin\Debug
INFO [LicenseProperties] 19 Oct 2010 15:35:48.415 : Licence expiry date: 12/31/9999
INFO [LicenseProperties] 19 Oct 2010 15:35:48.415 : Production license
DEBUG [SSLFTPClient] 19 Oct 2010 15:35:48.415 : Connecting to AddressRemovedFromLog:21
DEBUG [SSLFTPControlSocket] 19 Oct 2010 15:35:48.418 : waitOnShutdownSSL=True
DEBUG [HostNameResolver] 19 Oct 2010 15:35:48.450 : Resolving AddressRemovedFromLog
DEBUG [HostNameResolver] 19 Oct 2010 15:35:48.463 : Obtained 1 addresses
DEBUG [HostNameResolver] 19 Oct 2010 15:35:48.463 : IP address: AddressRemovedFromLog
DEBUG [HostNameResolver] 19 Oct 2010 15:35:48.463 : AddressRemovedFromLog resolved to AddressRemovedFromLog
DEBUG [ExFTPControlSocket] 19 Oct 2010 15:35:48.463 : Connecting directly to ftp-server AddressRemovedFromLog:21
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:48.526 : Setting socket timeout=60000
ALL [SecureSocket] 19 Oct 2010 15:35:48.529 : SecureSocket timeout=60000
ALL [SecureSocket] 19 Oct 2010 15:35:48.529 : SecureSocket timeout=60000
INFO [FTPControlSocket] 19 Oct 2010 15:35:48.542 : Command encoding=System.Text.SBCSCodePageEncoding
DEBUG [ExFTPControlSocket] 19 Oct 2010 15:35:48.544 : Created control-socket: SocksContext=, ProxySettings=NoProxy, RemoteHost=AddressRemovedFromLog, controlPort=21, timeout=60000
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:48.550 : StrictReturnCodes=False
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:48.564 : 220-This System Is For Authorized Users Only.
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:48.797 : 220-
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:48.797 : 220 Secure FTP Server - SecureTransport 4.7  ready.
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:48.821 : ---> AUTH TLS
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:48.874 : 234 SSLv23/TLSv1
DEBUG [SSLFTPControlSocket] 19 Oct 2010 15:35:48.878 : Beginning Ssl3, Tls1 handshake.
DEBUG [SocketController] 19 Oct 2010 15:35:58.219 : Processing hello
DEBUG [SecureSocket] 19 Oct 2010 15:35:58.590 : OnHandshakeComplete(True,null)
DEBUG [SSLFTPControlSocket] 19 Oct 2010 15:35:58.591 : Ssl3, Tls1 handshake complete.
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:58.593 : ---> PBSZ 0
ALL [AsyncResult] 19 Oct 2010 15:35:58.605 : Notify setting completed: null 0
ALL [AsyncResult] 19 Oct 2010 15:35:58.605 : Notify setting wait: 0
ALL [TransferBuffer] 19 Oct 2010 15:35:58.632 : Wait begin: TransferBuffer.Read (timeout=60000)
ALL [TransferBuffer] 19 Oct 2010 15:35:58.640 : Wait end: TransferBuffer.Read
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:58.641 : 200 PBSZ=0
ALL [AsyncResult] 19 Oct 2010 15:35:58.642 : Notify setting completed: null 1
ALL [AsyncResult] 19 Oct 2010 15:35:58.642 : Notify setting wait: 1
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:58.643 : ---> PROT P
ALL [AsyncResult] 19 Oct 2010 15:35:58.644 : Notify setting completed: null 2
ALL [AsyncResult] 19 Oct 2010 15:35:58.644 : Notify setting wait: 2
ALL [AsyncResult] 19 Oct 2010 15:35:58.647 : WaitOne completed: 2
ALL [TransferBuffer] 19 Oct 2010 15:35:58.647 : Wait begin: TransferBuffer.Read (timeout=60000)
ALL [AsyncResult] 19 Oct 2010 15:35:58.677 : Notify setting completed: null 3
ALL [TransferBuffer] 19 Oct 2010 15:35:58.677 : Wait end: TransferBuffer.Read
ALL [AsyncResult] 19 Oct 2010 15:35:58.677 : Notify setting wait: 3
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:58.734 : 200 PROT command successful
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:58.742 : ---> USER UsernameRemoved
ALL [AsyncResult] 19 Oct 2010 15:35:58.743 : WaitOne begin: 200 4
ALL [AsyncResult] 19 Oct 2010 15:35:58.743 : Notify setting completed: null 4
ALL [AsyncResult] 19 Oct 2010 15:35:58.743 : Notify setting wait: 4
ALL [AsyncResult] 19 Oct 2010 15:35:58.743 : WaitOne end: True 4
ALL [TransferBuffer] 19 Oct 2010 15:35:58.743 : Wait begin: TransferBuffer.Read (timeout=60000)
ALL [TransferBuffer] 19 Oct 2010 15:35:58.773 : Wait end: TransferBuffer.Read
ALL [AsyncResult] 19 Oct 2010 15:35:58.773 : Notify setting completed: null 5
ALL [AsyncResult] 19 Oct 2010 15:35:58.773 : Notify setting wait: 5
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:58.773 : 331 Password required for UsernameRemoved.
DEBUG [FTPControlSocket] 19 Oct 2010 15:35:58.775 : ---> PASS ********
ALL [AsyncResult] 19 Oct 2010 15:35:58.775 : WaitOne begin: 200 6
ALL [AsyncResult] 19 Oct 2010 15:35:58.775 : Notify setting completed: null 6
ALL [AsyncResult] 19 Oct 2010 15:35:58.775 : Notify setting wait: 6
ALL [AsyncResult] 19 Oct 2010 15:35:58.775 : WaitOne end: True 6
ALL [TransferBuffer] 19 Oct 2010 15:35:58.776 : Wait begin: TransferBuffer.Read (timeout=60000)
ALL [AsyncResult] 19 Oct 2010 15:36:01.370 : Notify setting completed: null 7
ALL [AsyncResult] 19 Oct 2010 15:36:01.371 : Notify setting wait: 7
ALL [TransferBuffer] 19 Oct 2010 15:36:01.371 : Wait end: TransferBuffer.Read
DEBUG [FTPControlSocket] 19 Oct 2010 15:36:01.371 : 230 Virtual user UsernameRemoved logged in.
DEBUG [FTPConnection] 19 Oct 2010 15:36:01.371 : Successfully logged in
DEBUG [ExFTPConnection] 19 Oct 2010 15:36:01.384 : Starting KeepAlive thread with period 30s
DEBUG [FTPControlSocket] 19 Oct 2010 15:36:01.399 : ---> FEAT
ALL [AsyncResult] 19 Oct 2010 15:36:01.399 : WaitOne begin: 200 8
ALL [AsyncResult] 19 Oct 2010 15:36:01.399 : Notify setting completed: null 8
ALL [AsyncResult] 19 Oct 2010 15:36:01.399 : Notify setting wait: 8
ALL [AsyncResult] 19 Oct 2010 15:36:01.399 : WaitOne end: True 8
ALL [TransferBuffer] 19 Oct 2010 15:36:01.399 : Wait begin: TransferBuffer.Read (timeout=60000)
ALL [AsyncResult] 19 Oct 2010 15:36:01.431 : Notify setting completed: null 9
ALL [AsyncResult] 19 Oct 2010 15:36:01.431 : Notify setting wait: 9
ALL [TransferBuffer] 19 Oct 2010 15:36:01.431 : Wait end: TransferBuffer.Read
DEBUG [FTPControlSocket] 19 Oct 2010 15:36:01.431 : 211-Extensions supported
DEBUG [FTPControlSocket] 19 Oct 2010 15:36:01.431 :  AUTH
DEBUG [FTPControlSocket] 19 Oct 2010 15:36:01.431 :  USER
DEBUG [

14 Answers

0 votes
by (180 points)
Hi,

I am also trying to set connection timeout (edtftpnet-2.1.0/free) on ftp.connect.
When I try to connect to non existing ftp adress it takes to long before connection failed is reported.
How can I set connection timeout ?

Peter
0 votes
by (162k points)
We've just added a connection timeout to the codebase, and it will appear in the next release of edtFTPnet/Free.
0 votes
by (180 points)
Can you give us an approximate date when the next release will appear ?
0 votes
by (162k points)
We hope before Christmas.

However send us an email and we'll send you a build to try out.

Categories

...