Jump to content


Photo

verifying valid connection


  • Please log in to reply
2 replies to this topic

#1 Richard_B

Richard_B
  • Members
  • 24 posts

Posted 27 February 2014 - 01:31 AM

so we had the recieving connecion change the passoerd on on us and the app just crashed with no explatination in the com exception. how do we confirm at connection time that the connection was sucessful. I need to trap this specific error.

#2 Richard_B

Richard_B
  • Members
  • 24 posts

Posted 27 February 2014 - 04:15 PM

Here is a suggestion for the next release the .Connect() should return bool as a quick test so you could use it like this

if(!sftp..Connect()) do something as I didn't connect

Just a thought.

#3 Richard_B

Richard_B
  • Members
  • 24 posts

Posted 27 February 2014 - 04:26 PM

So is this the right way to check connection status after a connect

_ftp.Connect();
if (_ftp.ConnectionStatus == ConnectionStatus.ftpConnectionStatusConnected)isConnected = true


_sftp.Connect();
if (_sftp.LastStatusCode == enumSFTPStatus.ftpSFTPStatusOk) isConnected = true;




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users