Export (0) Print
Expand All

PolicyException Class

The exception that is thrown when policy forbids code to run.

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

System.Object
   System.Exception
      System.SystemException
         System.Security.Policy.PolicyException

[Visual Basic]
<Serializable>
Public Class PolicyException
   Inherits SystemException
[C#]
[Serializable]
public class PolicyException : SystemException
[C++]
[Serializable]
public __gc class PolicyException : public SystemException
[JScript]
public
   Serializable
class PolicyException extends SystemException

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.

Remarks

This exception is typically thrown when the code requests more permissions than the policy will grant or the policy is configured to prohibit running the code.

PolicyException uses the HRESULT CORSEC_E_POLICY_EXCEPTION.

For a list of initial property values for an instance of PolicyException, see the constructor.

Requirements

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

PolicyException Members | System.Security.Policy Namespace | Exception | Handling and Throwing Exceptions

Show:
© 2014 Microsoft