Not able to create instance of Session class in c#.
Hi,
I am using WinSCP to download and upload files in C# program. My code look like this
When program execute line
it terminates. I don't even get any exception it just exception.
Thanks,
Darshan.
I am using WinSCP to download and upload files in C# program. My code look like this
public Session OpenSftpSession () { SessionOptions sessionOptions = new SessionOptions (); sessionOptions.Protocol = WinSCP.Protocol.Sftp; sessionOptions.HostName = this.hostName_; sessionOptions.UserName = this.userName_; sessionOptions.Password = this.password_; sessionOptions.SshHostKeyFingerprint = this.sshHostKeyFingerprint_; Session session = null; try { session = new Session (); session.Open (sessionOptions); } catch (Exception ex) { return null; } return session; }
When program execute line
session = new Session ();
Thanks,
Darshan.