다음을 통해 공유


<securityPolicy> Element

Defines valid mappings of named security levels to policy files. This section can be declared at the machine, site, and application levels. You can extend the security system by providing your own named <trustLevel> subtag mapped to a file specified by the policyFile attribute.

<configuration>
   <system.web>
      <securityPolicy>

<securityPolicy>
   <trustLevel name="value" policyFile="value"/>
</securityPolicy>

Subtag

Subtag Description
<trustLevel> Specifies a security level name and associated policy file for each security level.

Example

The following example specifies the policy files that handle different trust levels.

<securityPolicy>
    <trustLevel name="Full"    policyFile="internal"/>
    <trustLevel name="High"    policyFile="web_hightrust.config"/>
    <trustLevel name="Medium"  policyFile="web_mediumtrust.config"/>      
    <trustLevel name="Low"     policyFile="web_lowtrust.config"/>
    <trustLevel name="Minimal" policyFile="web_minimaltrust.config"/>
</securityPolicy>

Requirements

Contained Within: <system.web>

Web Platform: IIS 5.0, IIS 5.1, IIS 6.0

Configuration File: Machine.config, Web.config

Configuration Section Handler: System.Web.Configuration.SecurityPolicyConfigHandler

See Also

ASP.NET Configuration | ASP.NET Settings Schema | ASP.NET Trust Levels and Policy Files