ASP.NET Syntax ASP.NET Configuration Sections
Configures the set of code access security permissions applied to a particular application. The <trust
> section can be declared at the machine, site, and application levels.
<trust
level = "Full | High | Low | None"
originUrl = "url"
/>
The <trust
> tag supports two attributes.
Attribute |
Option |
Description |
level |
|
Specifies the security zone under which the application will be run. |
|
Full |
|
|
High |
|
|
Low |
|
|
None |
|
originUrl |
|
Specifies an application’s URL of origin. If present, this can be used for some permissions, such as Socket and WebRequest, that allow connectivity back to the host of origin. This allows permissions that rely on the notion of a host to function correctly. |
The following example specifies trust level settings for an ASP.NET application.
<securityPolicy>
<trustLevel name = "Full" policyFile = "internal" />
<trustLevel name = "High" policyFile = "web_hightrust.config" />
<trustLevel name = "Low" policyFile = "web_lowtrust.config" />
<trustLevel name = "None" policyFile = "web_notrust.config" />
</securityPolicy>
ASP.NET Configuration TrustSection Class TrustLevel Class TrustLevelCollection Class