Re: Not able to create instance of Session class in c#.
Inspect all debugger windows to see if you find something interesting.
Before posting, please read how to report bug or request support effectively.
Bug reports without an attached log file are usually useless.
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;
}
session = new Session ();