Using full trust in asp.net

Posted Thursday, January 12, 2006 8:20 PM by Shunjie
Some dll in which I use for my asp.net applications requires full trust in order for them to run when the web application are first started. This post no problem in .net 1.1 applications. However, in .net 2.0, we are required to put this in the web.config

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

Again, this requires little effort. However, they do post a problem when your website
is hosted under shared hosting environment

This morning, the host I using decided to increase its security by preventing Full trust.
As a result, the entire web application refuse to run (and result in my headache). The error Is:

Parser Error Message:
This
configuration section cannot be used at this path.  This happens when
the site administrator has locked access to this section using
<location allowOverride="false">
from an inherited configuration
file.

An email to the support department reveals that they have indeed just added the tag to their machine.config, and they will try to resolve this issue for me. For my case, the dlls I use is essential for the web applications and must be used. Yet, they cannot be run without Full Trust. I am not sure how this issue can be resolve, since I do not think the Web Host is prepare to change their machine.config. For those who are developing .NET 2.0 applications and are using dll that requires full trust, perhaps they should take this into account.