Session is already open

Advertisement

ealarcon
Joined:
Posts:
1
Location:
Canada

Session is already open

Hi there:
I am using C# to programmatically upload/download files to and SFTP site, but I have been receiving the error
Session is already open
session.DebugLogPath = @"C:\\DigitalPen\debug.log";
// Connect
session.Open(sessionOptions);
session.ExecutablePath = "C:\\Program Files (x86)\\WinSCP";

If I set the ExecutablePath property before the Open method:
session.DebugLogPath = @"C:\\DigitalPen\debug.log";
session.ExecutablePath = "C:\\Program Files (x86)\\WinSCP";
 
// Connect
session.Open(sessionOptions);
The error I get is
C:\Program Files (x86)\WinSCP does not exists.
Please help!

Reply with quote

Advertisement

Guest

Re: Session is already open

Please disregard, I ended up removing the line below and now it works like a charm.
session.ExecutablePath = "C:\\Program Files (x86)\\WinSCP"

Reply with quote

Advertisement

You can post new topics in this forum