This documentation is archived and is not being maintained.

SecurityManager.PolicyHierarchy Method

Provides an enumerator to access the security policy hierarchy by levels, such as computer policy and user policy.

[Visual Basic]
Public Shared Function PolicyHierarchy() As IEnumerator
public static IEnumerator PolicyHierarchy();
public: static IEnumerator* PolicyHierarchy();
public static function PolicyHierarchy() : IEnumerator;

Return Value

An IEnumerator for PolicyLevel objects that compose the security policy hierarchy.


Exception Type Condition
SecurityException The code that calls this method does not have SecurityPermissionFlag.ControlPolicy.


The returned enumerator provides successive PolicyLevel objects that represent the policy at the respective (machine, user, enterprise, application domain) level of the hierarchy. These objects are the live policy objects; altering these objects can have unpredictable results.

Minimum policy hierarchy consists of a machine level, an enterprise level, and a user level. However, the hierarchy can include additional levels.


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

.NET Framework Security: 

See Also

SecurityManager Class | SecurityManager Members | System.Security Namespace