How to grant Full Trust to your ASP.NET web site on your VPS / Dedicated Server
December 9, 2008 by MK
Filed under Hosting, web development
On your Virtual Private Server or Dedicated server browse to the configuration folder
Normally installation path will be - C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
Open the web.config in notepad
Place following lines at the top of you config with the <configuration> directive replacing yourdomain.com with the name of the IIS web you wish to grant full trust to.
<location path=”yourdomain.com” allowOverride=”true”>
<system.web>
<trust level=”Full” originUrl=”" />
</system.web>
</location>
Other Full Trust Hosting and ASP.NET related articles -
Now your web.config will look like -
<?xml version=”1.0″ encoding=”utf-8″?>
<!– the root web configuration file –>
<configuration>
<!–
Using a location directive with a missing path attribute
scopes the configuration to the entire machine. If used in
conjunction with allowOverride=”false”, it can be used to
prevent configuration from being altered on the machine
Administrators that want to restrict permissions granted to
web applications should change the default Trust level and ensure
that overrides are not allowed
–>
<location allowOverride=”true”>
<system.web>
<securityPolicy>
<trustLevel path=”yourdomain.com” name=”Full” policyFile=”internal” />
</securityPolicy>
<trust level=”Full” originUrl=”" />
</system.web>
</location>
<system.net>
<defaultProxy>
<proxy usesystemdefault=”true” />
</defaultProxy>
</system.net>
Looking for good Full or Modified Medium Trust Windows / ASP.NET Hosting Plans - Try Webhost4life OR Alentus (We have been using them for years now)














