
<location> | 461
web.config
Reference
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
<trust>
<trust
level="Full|High|Medium|Low|Minimal"
originUrl=URL />
Assigns a named trust level created with the <trustLevel> child element of the
<securityPolicy> element to a machine, a site, or an application.
Scope
Machine, Application
Attributes
level
Specifies the trust level to be applied. This attribute can be any value defined
by the
<securityPolicy> element. The default is Full. This attribute is
required.
originUrl
Specifies URL of origin of an application. This attribute allows classes such as
WebRequest, which may need the origin host information for certain security
permissions, to work properly. This attribute is optional.
Child Elements
None
Example
This example sets the application CAS permissions, based on a custom trust level:
<configuration>
<system.web>
<trust level="myTrustLevel" />
</system.web>
</configuration>
Notes
Make sure that you understand the security implications of using custom security
policy mappings before using this element. Incorrect permissions can cause major
problems for your application.
The syntax shown at the beginning of this section is for Version 1.1 of the .NET
Framework.
<location>
<location
path=pathToConfigure
allowOverride=boolean >
<system.web>
<!-- Configuration settings -->
</system.web>
</location>