Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
1.4k views
in .NET FTP by
Hi all,

Here is a problem while establishing connection with the server which has a session timeout setting.
I can't see any correct ways to determine my FTP session was dropped in FTPClient class (edtFTPnet free version).
Property 'Connected' (or 'IsConnected') is unable to determine such situation.

Currently I send NOOP command to the server and catch SocketException with ErrorCode 10054 (Connection Reset) to probe the connection.
If exception caught I need to call QuitImmediately() to set FTPClient instance to Disconnected state, and then I need to call Connect() again.

Are there any more convenient ways to test/refresh FTP connection?

Thanks in advance!

1 Answer

0 votes
by (51.6k points)
No, there is no easier way to do this in the free version. The commercial versions have keep-alive functionality which implicitly covers this situation, although they don't automatically reconnect. So, you might have to stick with the way you're doing it for now.

- Hans (EDT)

Categories

...