Topic "SecurityException: That assembly does not allow partially trusted callers."

Author Message
pbiraki
[View user's profile]

Joined: 2016-02-29
Posts: 3
Hello,
I have created a .Net app that uses the WinScp assembly to connect to a sftp server. I was able to run the code locally and connect to an sftp server but when I copy the code to my web server and trying to connect I get the following error:


"Security Exception
Description: The application attempted to perform an operation not allowed by the security policy. To grant this application the required permission please contact your system administrator or change the application's trust level in the configuration file.

Exception Details: System.Security.SecurityException: That assembly does not allow partially trusted callers."


Please have in mind that I can't change the configuration file of our web server since many other web apps are running there.

Thanks
Kalliopi
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
If you cannot change the configuration to allow the operations that the assembly needs, you cannot use it. I'm sorry.
pbiraki
[View user's profile]

Joined: 2016-02-29
Posts: 3
Thank you for replying to me.

What do you mean by "change the configuration". What configurations I should change?
pbiraki
[View user's profile]

Joined: 2016-02-29
Posts: 3
I was able to make it work changing the "Trust Level" to my web app to "Full".
I just do not know how safe is this.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
pbiraki wrote:
I was able to make it work changing the "Trust Level" to my web app to "Full".
I just do not know how safe is this.

Thanks for sharing your solution.
If you trust WinSCP and trust that your code is not vulnerable, it's ok.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License