Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

rht609

Oh geez, what a rookie mistake. Thank you for the help, sorry to waste your time looking at this.
TheCliGuy

SessionOptions.HostName is not set

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

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.