.NET assembly wrapper class
Ok Back to Square one!!! I asked this question almost a month ago and had to switch for not using .net dll...but I need to use it and for some reason the following code runs fine on local server, but not on Production Server???? It gives Time-Out Exception?? What is the problem? Its not registering the Ssh Servers Host key in cache through the code even though I am hard coding it. Please help.
Dim iALPS_SessionOptions As New WinSCP.SessionOptions()
With iALPS_SessionOptions
.Protocol = Protocol.Sftp
.HostName = Machine.ToString
.UserName = UserID.ToString
.Password = Password.ToString
.SshHostKey = UnixSshHostKey.ToString
End With
Try
Using iALPS_Session As New WinSCP.Session
Try
iALPS_Session.Open(iALPS_SessionOptions)
Catch ex As Exception
Response.Write(ex.ToString())
End Try
Dim iALPS_SessionOptions As New WinSCP.SessionOptions()
With iALPS_SessionOptions
.Protocol = Protocol.Sftp
.HostName = Machine.ToString
.UserName = UserID.ToString
.Password = Password.ToString
.SshHostKey = UnixSshHostKey.ToString
End With
Try
Using iALPS_Session As New WinSCP.Session
Try
iALPS_Session.Open(iALPS_SessionOptions)
Catch ex As Exception
Response.Write(ex.ToString())
End Try