This assembly does not allow partially trusted callers

2

I have my project, and in it I have a dll to access some methods, in development it works normally, but in the homologation environment this is giving this msg:

  

"This assembly does not allow partially trusted callers."

What can it be?

Note: I already added "[assembly: AllowPartiallyTrustedCallers()]" to AssemblyInfo.cs

    
asked by anonymous 11.06.2014 / 00:27

1 answer

2

One option is to insert in Web.config the following:

<trust level="Full" originUrl=""/>

The error happens because the application may be configured for Medium Trust .

If it still does not work, change the references, if any:

  • System.Web.Mvc
  • System.Web.Routing
  • System.Web.Abstractions

For Copy Local True in the reference properties. Try to publish again.

    
11.06.2014 / 00:44