posts - 48, comments - 16, trackbacks - 4

My Links

Archives

Post Categories

Web Dev

SecurityException: Partially trusted callers

Most hosts have sites running at a Medium Trust level as Microsoft recommends. When a referenced dll requires full trust callers, you will be greated by:

 

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.

 

The particular assembly of interest was from a third party. My initial idea was to simply dissassemble it with reflector and recompile it with the changes necessary. Unfortunately the assembly was obscured and I was not able to go with that route.

Since I couldn't dissassemble the assembly, I figured perhaps I can just edit it in place; afterall I don't care about the source. A few googles later I found Reflexil, http://sourceforge.net/projects/reflexil/. Just select the assembly and with reflexil select save as. The following prompt shows.

 

 

Select "Remove Strong Name", and on the next prompt remove it and update the assembly references. Then "cancel and keep it delay signed", this should do the trick, worked for me.

Now, this is probably not the best approach so any feedback is appreciated.

Usefull links:

Print | posted on Saturday, May 10, 2008 1:54 PM | Filed Under [ Web Programming ]

kick it on DotNetKicks.com

Feedback

Gravatar

# re: SecurityException: Partially trusted callers

This would work for shared hosting situations like godaddy with things like paypal, thanks!
5/10/2008 10:54 PM | Anon.

Post Comment

Title  
Name  
Email
Url
Comment   
Please add 7 and 6 and type the answer here:

Powered by: