SecurityException: That assembly does not allow partially trusted callers.

Advertisement

pbiraki
Joined:
Posts:
3

SecurityException: That assembly does not allow partially trusted callers.

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

Reply with quote

Advertisement

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

Re: SecurityException: That assembly does not allow partially trusted callers.

If you cannot change the configuration to allow the operations that the assembly needs, you cannot use it. I'm sorry.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,441
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.

Reply with quote

Advertisement

You can post new topics in this forum