Error in medium trust environment

Feb 21, 2011 at 11:38 PM


I am trying to deploy my site to a shared hosting environment, which is not a full trust environment.

When I try to open a page I get this error:

System.Security.SecurityException: That assembly does not allow partially trusted callers.

I'm pretty sure this is due to the MvcPager assembly.

Any ideas on how to get around this?


Feb 22, 2011 at 12:14 AM

I downloaded the source and added the following to the AssemblyInfo.cs:


using System.Security;

using System.Security.Permissions;

[assembly: AllowPartiallyTrustedCallers()]


I recompiled and now it's working.