
<securityPolicy> | 457
web.config
Reference
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
<securityPolicy>
<securityPolicy>
<trustLevel
name=trustLevelName
policyFile=fileName />
</securityPolicy>
Configures mappings of trust names (used by the <trust> element) to security
policy files. The security policy files contain elements that configure the code
access security permissions that are specific to that trust level.
<securityPolicy>
can contain one or more <trustLevel> elements.
Scope
Machine, Application
Attributes
None
Child Element
<trustLevel>
Each
<trustLevel> element maps a trust-level name to a specific policy file
that implements the code access security permissions for that trust level. The
name attribute specifies the name by which the trust level will be referred in
the
<trust> element, while the policyFile attribute specifies the name of the
policy file to map to the name.
Example
This example comes from the default <securityPolicy> element in machine.config:
<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>
Notes
For a specific application, if you want to modify the code access security permis-
sions applied, you could ...