Error by session.ExecutablePath

Advertisement

oli001
Joined:
Posts:
3

Error by session.ExecutablePath

Hi,

I have VS.net 2010 and the Assembly WINSCP.dll is sucessfully integrated.
WinSCP ist NOT installed on my System.

I set session.ExecutablePath = "D:\\winscp507\\"; - here is the file winscp.exe
But I got the Exception: "WinSCP.SessionLocalException: D:\winscp507\ does not exists."

If I set the path to "D:\\winscp507\\winscp.exe"; I get the Exception: "System.IO.FileNotFoundException: D:\Entwicklung C"
First the path in Executable path is not the path the FNF-Exception shows, second: the path nomally is D:\Entwicklung C#\...

Thanks for help.

Oli

Reply with quote

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: Error by session.ExecutablePath

You should set the ExecutablePath to path to .exe (your second variant), not to path to containing directory.

Please set Session.DebugLogPath and attach or email me the log.

Reply with quote

oli001
Joined:
Posts:
3

Re: Error by session.ExecutablePath

martin wrote:

You should set the ExecutablePath to path to .exe (your second variant), not to path to containing directory.
Please set Session.DebugLogPath and attach or email me the log.

The problem was the '#'!
After renaming the folder in "Entwicklung DotNet\...." it works fine.

But I have another question:
The SSL/TLS certificate needs the key from server. Is it possible to trust always, without put the key in the variable?

Thanks for help,

Oli

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,440
Location:
Prague, Czechia

Re: Error by session.ExecutablePath

oli001 wrote:

The problem was the '#'!
After renaming the folder in "Entwicklung DotNet\...." it works fine.
Thanks for sharing this. I'll try to reproduce the problem.

But I have another question:
The SSL/TLS certificate needs the key from server. Is it possible to trust always, without put the key in the variable?
If the certificate is untrusted, WinSCP .NET assembly won't connect. So you need to set the SessionOptions.SslCertificate. If that's what you ask for.

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: Error by session.ExecutablePath

I wasn't able to reproduce the problem with FileNotFoundException.
I have emailed you a link to a debug version of the assembly.

Reply with quote

Hiro.A
Joined:
Posts:
20
Location:
Japan

I experienced it , too (Error by session.ExecutablePath)

Hi.

(I am Japanese and please forgive me if my english is poor..)

I also got the same error.
I guess the main reason of this issue is that my environment of my c# binaries was @"I:\VC# Projects\C#2010\scptest\scptest\bin\Debug\".

This issue may raised if C# binary's path has any "#" characters.

Would you modify this assembly to accept it ?


Thank you for offering this fantastic programs!

Reply with quote

Advertisement

You can post new topics in this forum