Fabrice's weblog

Tools and Source

News

My .NET Toolbox
An error occured. See the script errors signaled by your web browser.
No tools selected yet
.NET tools by SharpToolbox.com

Read sample chapters or buy LINQ in Action now!
Our LINQ book is also available on AMAZON

.NET jobs

Emplois .NET

transatlantys hot news

Contact

Me

Others

Selected content

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.
Posted: Dec 15 2005, 12:14 AM by Fabrice Marguerie | with 4 comment(s)
Filed under:

Comments

Daren said:

Any idea when that may be ? I was planning to start using PageMethods, the workaround you mention won't work since any host running in medium host will (or at least should) have <location allowOverride="false"> set at the machine level.
# December 15, 2005 5:26 AM

Fabrice said:

Daren, I can make a new release this week-end.
# December 15, 2005 6:03 AM

Daren said:

Perfect thanks
# December 15, 2005 10:24 AM

Fabrice said:

A new version that fixes this problem has just been published.
# December 19, 2005 10:56 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)