This Assembly does not allow partially reliable callers

Asked

Viewed 959 times

2

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

"This Assembly does not allow partially reliable callers. "

What can it be?

Obs: I’ve already added the "[assembly: AllowPartiallyTrustedCallers()]" in the AssemblyInfo.cs

  • I discovered the problem, they changed the hosting policy. Thanks for the help!

1 answer

2

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

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

The error happens because the application may be set to Medium Trust.

If it still doesn’t work, change the references, if any:

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

To Copy Local True in the reference properties. Try publishing there again.

  • Gave error "This configuration section cannot be used in this path. This occurs when the site administrator blocks access to this section using <Location allowOverride="false"> from an inherited configuration file. "

  • @Renanfbossa I put some more tips.

  • Same error mentioned above... :/

Browser other questions tagged

You are not signed in. Login or sign up in order to post.