That assembly does not allow partially trusted callers.

Dec 11, 2009 at 9:05 PM

Hi all,


I've added references to the Yui compressor dll's in my .Net 2.0 project but when I try to run my website on a shared hosting environment, I'm getting the error:

"That assembly does not allow partially trusted callers."


I've tried adding the following line to my AssemblyInfo.cs file but with no luck resolving the issue:

[assembly: System.Security.AllowPartiallyTrustedCallers()]


I also added this line but this didn't fix the problem:

[assembly: System.Security.Permissions.PermissionSet(System.Security.Permissions.SecurityAction.RequestMinimum, Name = "FullTrust")]


Does anyone know how to resolve this issue?

Dec 12, 2009 at 1:01 AM

Hi mpocher - thanks for stopping by, trying this out and then posting this issue.

Um .. i'm not sure what part of the application is not gettng trusted. I'm guessing it might be some I/O file activity that doesn't work in Medium Trust?

I'll have to keep an eye on this thread and see if some smarter guru's can tell me what the fix is .. i've never had to deal with shared hosting, so i've never had this issue .. or can replicate it (because i don't have any shared hosting accounts).

Mar 14, 2010 at 8:46 AM
Edited Mar 14, 2010 at 8:53 AM

Hi, I've got the same issue on a shared hosting environment. I can't understand why, I'm using others assembly with no issue. I'll have a look to the source code.

Mar 16, 2010 at 12:29 PM

Check the Issue Tracker tab. Someone wrote about this.