asp.net.ph

Skip Navigation Links

<trust> Section

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.

Syntax Example

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>
See Also

ASP.NET Configuration   TrustSection Class   TrustLevel Class   TrustLevelCollection Class



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note