SessionOptions.HostName is not set

Advertisement

rht609
Joined:
Posts:
2

SessionOptions.HostName is not set

Using VB.NET code generated by WinSCP 5.17.6:
With sessionOptions
    .Protocol = Protocol.Sftp
    .HostName = "xxxxx"
    .UserName = "xxxx"
    .Password = "xxxxxxxx"
    .SshHostKeyFingerprint = "ssh-rsa 1024 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
End With
 
Using mySession As Session = New Session
    ' Connect
    mySession.Open(mySessionOptions)
End Using
returns an error
SessionOptions.HostName is not set
Looks as if it is. What am I missing?

Thanks in advance.

Reply with quote

Advertisement

TheCliGuy
Joined:
Posts:
13

SessionOptions.HostName is not set

You've created a SessionOptions object called sessionOptions but passed mySessionOptions (which doesn't exist) to the Open method.

Reply with quote

Advertisement

You can post new topics in this forum