This documentation is archived and is not being maintained.

PolicyLevel Class

Represents the security policy levels for the common language runtime. This class cannot be inherited.

For a list of all members of this type, see PolicyLevel Members.


[Visual Basic]
NotInheritable Public Class PolicyLevel
public sealed class PolicyLevel
public __gc __sealed class PolicyLevel
class PolicyLevel

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.


The highest level of security policy is enterprise-wide. Successive lower levels of hierarchy represent further policy restrictions, but can never grant more permissions than allowed by higher levels. The following policy levels are implemented:

1. Enterprise: security policy for all managed code in an enterprise.

2. Machine: security policy for all managed code run on the computer.

3. User: security policy for all managed code run by the user.

4. Application domain: security policy for all managed code in an application.

A policy level consists of a set of code groups organized into a single rooted tree (see CodeGroup), a set of named permission sets that are referenced by the code groups to specify permissions to be granted to code belonging to the code group, and a list of fully-trusted assemblies.

Use SecurityManager.PolicyHierarchy to enumerate the policy levels.


Namespace: System.Security.Policy

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Assembly: Mscorlib (in Mscorlib.dll)

See Also

PolicyLevel Members | System.Security.Policy Namespace