This documentation is archived and is not being maintained.

HostSecurityManager.DomainPolicy Property

When overridden in a derived class, gets the security policy for the current application domain.

Namespace:  System.Security
Assembly:  mscorlib (in mscorlib.dll)

public virtual PolicyLevel DomainPolicy { get; }

Property Value

Type: System.Security.Policy.PolicyLevel
A PolicyLevel object. The default is null.

This property can be overridden in a derived class. The base implementation always returns null.

This property is called at AppDomain creation time. It allows a host to supply a policy for the current AppDomain. A policy level consists of the following:

  • A set of code groups organized into a single rooted tree.

  • 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.

  • A list of fully trusted assemblies.

Important noteImportant Note:

See the Notes to Inheritors for the HostSecurityManager class for critical implementation information.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0