Error Reporting (General questions)
Hi,
Below is a section of code I'm running to connect to an SSH Server (Which right now doesn't exist on IP's I'm trying to connect with). In the design environment it seems like the try...catch statement isn't working properly. I'm actually getting a design enviroment error for an unhandled exception of type System.Net.Sockets.SocketException in the weonlydo DLL. The error is No connection could be made because the target machine actively refused it. My issue isn't the error...my issue is that the try catch statement below isn't picking it up. The actual ex.message is Timeout occurred due to inactivity
Any idea what's causing this behavior? BTW, using 3.0.1 of the SFTP .NET Component.
-Jason
[code]
Try
'Try to clear out the client state
If m_Client.State <> WeOnlyDo.Client.SFTP.States.Disconnected Then
ResetClientState()
End If
'Connect
m_Client.Connect()
'Log connection
WriteCommLogEvent(CommLogItem.EventTypeEnum.Connect, svrItem, Connection attempt successful. )
Catch ex As Exception
'Log error into event log
WriteCommLogEvent(CommLogItem.EventTypeEnum.Connect, svrItem, Connection attempt failed. & ex.Message)
End Try
[/code]