ASP.NET Hosting

Allow strong-named assemblies to be called in shared web hosting environments

As reported by Aaron Robson, you should use the AllowPartiallyTrustedCallers attribute if you want to allow strong-named assemblies to be called by partially trusted code. This is needed for shared web hosting environments.
Shared hosting environments usually run under a Medium Trust security setting. In Aspnet 2.0 this has changed somewhat, and one of the effects is that any strong named assembly must have the [assembly:AllowPartiallyTrustedCallers] attribute. This is a problem if you're using third party code and they haven't updated it.

One workaround is to set <trust level="full" /> in the web.config file (within system.web element) - although I suspect hosts shouldn't allow this to work.

I will include this in PageMethod's next release. In the meantime, you can use the workaround with the configuration file.

3 Comments

Comments have been disabled for this content.