﻿<?xml version="1.0" encoding="utf-8"?><Type Name="SecurityException" FullName="System.Security.SecurityException" FullNameSP="System_Security_SecurityException" Maintainer="ecma"><TypeSignature Language="ILASM" Value=".class public serializable SecurityException extends System.SystemException" /><TypeSignature Language="C#" Value="public class SecurityException : SystemException" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit SecurityException extends System.SystemException" /><MemberOfLibrary>BCL</MemberOfLibrary><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyPublicKey>[00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 ]</AssemblyPublicKey><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ThreadingSafetyStatement>All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.</ThreadingSafetyStatement><Base><BaseTypeName>System.SystemException</BaseTypeName></Base><Interfaces /><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(true)</AttributeName></Attribute></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>A <see cref="T:System.Security.SecurityException" /> exception is thrown when a caller does not have the permissions required to access a resource. The following example instantiates a <see cref="T:System.Security.PermissionSet" /> object that includes a <see cref="T:System.Security.Permissions.UIPermission" /> object to allow access to UI objects and the Clipboard and a <see cref="T:System.Security.Permissions.RegistryPermission" /> object to prevent registry access. The call to the <see cref="M:System.Security.PermissionSet.PermitOnly" /> method means that these permissions will apply regardless of the permissions assigned to the caller. As a result, the attempt to create a registry key throws a <see cref="T:System.Security.SecurityException" />. </para><para>code reference: System.SecurityException.Class#1</para><para><see cref="T:System.Security.SecurityException" /> uses the HRESULT COR_E_SECURITY, which has the value 0x8013150A.</para><para>For a list of the initial property values for an instance of the <see cref="T:System.Security.SecurityException" /> class, see a specific <see cref="Overload:System.Security.SecurityException.#ctor" /> constructor.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>The exception that is thrown when a security error is detected.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor()" /><MemberSignature Language="C#" Value="public SecurityException ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The following table shows the initial property values for an instance of the <see cref="T:System.Security.SecurityException" /> class.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.InnerException" /></para></term><description><para>A null reference (Nothing in Visual Basic). </para></description></item><item><term><para><see cref="P:System.Exception.Message" /></para></term><description><para>The localized error message string. </para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.SecurityException" /> class with default properties.</para></summary></Docs><Excluded>0</Excluded></Member><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message)" /><MemberSignature Language="C#" Value="public SecurityException (string message);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="message" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The following table shows the initial property values for an instance of the <see cref="T:System.Security.SecurityException" /> class.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.InnerException" /></para></term><description><para>A null reference (Nothing in Visual Basic). </para></description></item><item><term><para><see cref="P:System.Exception.Message" /></para></term><description><para>The localized error message string. </para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.SecurityException" /> class with a specified error message.</para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />The error message that explains the reason for the exception. </param></Docs><Excluded>0</Excluded></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="protected SecurityException (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig specialname rtspecialname instance void .ctor(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" /><Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This constructor is called during deserialization to reconstitute the exception object transmitted over a stream. </para><para>This constructor sets the following property values based on the information in the <paramref name="info" /> parameter:</para><list type="bullet"><item><para><see cref="P:System.Security.SecurityException.Action" /></para></item><item><para><see cref="P:System.Security.SecurityException.FirstPermissionThatFailed" /></para></item><item><para><see cref="P:System.Security.SecurityException.Demanded" /></para></item><item><para><see cref="P:System.Security.SecurityException.RefusedSet" /></para></item><item><para><see cref="P:System.Security.SecurityException.DenySetInstance" /></para></item><item><para><see cref="P:System.Security.SecurityException.PermitOnlySetInstance" /></para></item><item><para><see cref="P:System.Security.SecurityException.FailedAssemblyInfo" /></para></item><item><para><see cref="P:System.Security.SecurityException.Method" /></para></item><item><para><see cref="P:System.Security.SecurityException.Zone" /></para></item><item><para><see cref="P:System.Security.SecurityException.Url" /></para></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.SecurityException" /> class with serialized data.</para></summary><param name="info"><attribution license="cc4" from="Microsoft" modified="false" />The object that holds the serialized object data. </param><param name="context"><attribution license="cc4" from="Microsoft" modified="false" />The contextual information about the source or destination. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="ILASM" Value="public rtspecialname specialname instance void .ctor(string message, class System.Exception inner)" /><MemberSignature Language="C#" Value="public SecurityException (string message, Exception inner);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, class System.Exception inner) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue /><Parameters><Parameter Name="message" Type="System.String" /><Parameter Name="inner" Type="System.Exception" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>An exception that is thrown as a direct result of a previous exception should include a reference to the previous exception in the <see cref="P:System.Exception.InnerException" /> property. The <see cref="P:System.Exception.InnerException" /> property returns the same value that is passed into the constructor, or null if the <see cref="P:System.Exception.InnerException" /> property does not supply the inner exception value to the constructor.</para><para>The following table shows the initial property values for an instance of the <see cref="T:System.Security.SecurityException" /> class.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.InnerException" /></para></term><description><para>The inner exception reference. </para></description></item><item><term><para><see cref="P:System.Exception.Message" /></para></term><description><para>The localized error message string. </para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.SecurityException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.</para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />The error message that explains the reason for the exception. </param><param name="inner"><attribution license="cc4" from="Microsoft" modified="false" />The exception that is the cause of the current exception. If the <paramref name="inner" /> parameter is not null, the current exception is raised in a catch block that handles the inner exception. </param></Docs><Excluded>0</Excluded></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public SecurityException (string message, Type type);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, class System.Type type) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="message" Type="System.String" /><Parameter Name="type" Type="System.Type" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The following table shows the property values set by this constructor.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.Message" /></para></term><description><para>The localized error message string specified by <paramref name="message" />. </para></description></item><item><term><para><see cref="P:System.Security.SecurityException.PermissionType" /></para></term><description><para>The <see cref="T:System.Type" /> of the permission that failed, specified by <paramref name="type" />.</para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.SecurityException" /> class with a specified error message and the permission type that caused the exception to be thrown.</para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />The error message that explains the reason for the exception. </param><param name="type"><attribution license="cc4" from="Microsoft" modified="false" />The type of the permission that caused the exception to be thrown. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public SecurityException (string message, Type type, string state);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, class System.Type type, string state) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="message" Type="System.String" /><Parameter Name="type" Type="System.Type" /><Parameter Name="state" Type="System.String" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The following table shows the property values set by this constructor.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.Message" /></para></term><description><para>The localized error message string specified by <paramref name="message" />. </para></description></item><item><term><para><see cref="P:System.Security.SecurityException.PermissionType" /></para></term><description><para>The <see cref="T:System.Type" /> of the permission that failed, specified by <paramref name="type" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.Demanded" /></para></term><description><para>The demanded security permission, permission set, or permission set collection that failed.</para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.SecurityException" /> class with a specified error message, the permission type that caused the exception to be thrown, and the permission state.</para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />The error message that explains the reason for the exception. </param><param name="type"><attribution license="cc4" from="Microsoft" modified="false" />The type of the permission that caused the exception to be thrown. </param><param name="state"><attribution license="cc4" from="Microsoft" modified="false" />The state of the permission that caused the exception to be thrown. </param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public SecurityException (string message, object deny, object permitOnly, System.Reflection.MethodInfo method, object demanded, System.Security.IPermission permThatFailed);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, object deny, object permitOnly, class System.Reflection.MethodInfo method, object demanded, class System.Security.IPermission permThatFailed) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="message" Type="System.String" /><Parameter Name="deny" Type="System.Object" /><Parameter Name="permitOnly" Type="System.Object" /><Parameter Name="method" Type="System.Reflection.MethodInfo" /><Parameter Name="demanded" Type="System.Object" /><Parameter Name="permThatFailed" Type="System.Security.IPermission" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Use this constructor if a frame that contains a Deny caused the demand failure. The following table shows the property values set by this constructor.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.Message" /></para></term><description><para>The localized error message string specified by <paramref name="message" />. </para></description></item><item><term><para><see cref="P:System.Security.SecurityException.FirstPermissionThatFailed" /></para></term><description><para>The first permission in the permission set or permission set collection specified by <paramref name="permThatFailed" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.GrantedSet" /></para></term><description><para>An empty string.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.Demanded" /></para></term><description><para>The security permission, permission set, or permission set collection specified by <paramref name="demanded" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.RefusedSet" /></para></term><description><para>An empty string.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.DenySetInstance" /></para></term><description><para>The denied security permission, permission set, or permission set collection specified by <paramref name="deny" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.PermitOnlySetInstance" /></para></term><description><para>The permission, permission set, or permission set collection specified by <paramref name="permitOnly" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.FailedAssemblyInfo" /></para></term><description><para>null.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.Method" /></para></term><description><para>The <see cref="T:System.Reflection.MethodInfo" /> specified by <paramref name="method" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.Zone" /></para></term><description><para><see cref="F:System.Security.SecurityZone.NoZone" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.Url" /></para></term><description><para>An empty string.</para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.SecurityException" /> class for an exception caused by a Deny on the stack.  </para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />The error message that explains the reason for the exception.</param><param name="deny"><attribution license="cc4" from="Microsoft" modified="false" />The denied permission or permission set.</param><param name="permitOnly"><attribution license="cc4" from="Microsoft" modified="false" />The permit-only permission or permission set.</param><param name="method"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Reflection.MethodInfo" /> that identifies the method that encountered the exception.</param><param name="demanded"><attribution license="cc4" from="Microsoft" modified="false" />The demanded permission, permission set, or permission set collection.</param><param name="permThatFailed"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Security.IPermission" /> that identifies the permission that failed.</param></Docs></Member><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public SecurityException (string message, System.Reflection.AssemblyName assemblyName, System.Security.PermissionSet grant, System.Security.PermissionSet refused, System.Reflection.MethodInfo method, System.Security.Permissions.SecurityAction action, object demanded, System.Security.IPermission permThatFailed, System.Security.Policy.Evidence evidence);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string message, class System.Reflection.AssemblyName assemblyName, class System.Security.PermissionSet grant, class System.Security.PermissionSet refused, class System.Reflection.MethodInfo method, valuetype System.Security.Permissions.SecurityAction action, object demanded, class System.Security.IPermission permThatFailed, class System.Security.Policy.Evidence evidence) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="message" Type="System.String" /><Parameter Name="assemblyName" Type="System.Reflection.AssemblyName" /><Parameter Name="grant" Type="System.Security.PermissionSet" /><Parameter Name="refused" Type="System.Security.PermissionSet" /><Parameter Name="method" Type="System.Reflection.MethodInfo" /><Parameter Name="action" Type="System.Security.Permissions.SecurityAction" /><Parameter Name="demanded" Type="System.Object" /><Parameter Name="permThatFailed" Type="System.Security.IPermission" /><Parameter Name="evidence" Type="System.Security.Policy.Evidence" /></Parameters><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>Use this constructor to throw an exception when the grant set caused the failure of the demand.</para><para>The following table shows the property values set by this constructor.</para><list type="table"><listheader><item><term><para>Property </para></term><description><para>Value </para></description></item></listheader><item><term><para><see cref="P:System.Exception.Message" /></para></term><description><para>The localized error message string specified by <paramref name="message" />. </para></description></item><item><term><para><see cref="P:System.Security.SecurityException.FirstPermissionThatFailed" /></para></term><description><para>The first permission in the permission set or permission set collection specified by <paramref name="permThatFailed" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.GrantedSet" /></para></term><description><para>The <see cref="T:System.Security.PermissionSet" /> specified by <paramref name="grant" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.Demanded" /></para></term><description><para>The demanded security permission, permission set, or permission set collection that failed, specified by <paramref name="demanded" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.RefusedSet" /></para></term><description><para>The <see cref="T:System.Security.PermissionSet" /> specified by <paramref name="refused" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.DenySetInstance" /></para></term><description><para>An empty string.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.PermitOnlySetInstance" /></para></term><description><para>An empty string.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.FailedAssemblyInfo" /></para></term><description><para>The <see cref="T:System.Reflection.AssemblyName" /> specified by <paramref name="assemblyName" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.Method" /></para></term><description><para>The <see cref="T:System.Reflection.MethodInfo" /> specified by <paramref name="method" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.Zone" /></para></term><description><para>The <see cref="T:System.Security.SecurityZone" /> value  from the <see cref="T:System.Security.Policy.Evidence" /> specified by <paramref name="evidence" />.</para></description></item><item><term><para><see cref="P:System.Security.SecurityException.Url" /></para></term><description><para>The URL from the <see cref="T:System.Security.Policy.Evidence" /> specified by <paramref name="evidence" />.</para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Initializes a new instance of the <see cref="T:System.Security.SecurityException" /> class for an exception caused by an insufficient grant set. </para></summary><param name="message"><attribution license="cc4" from="Microsoft" modified="false" />The error message that explains the reason for the exception.</param><param name="assemblyName"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Reflection.AssemblyName" /> that specifies the name of the assembly that caused the exception.</param><param name="grant"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Security.PermissionSet" /> that represents the permissions granted the assembly.</param><param name="refused"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Security.PermissionSet" /> that represents the refused permission or permission set.</param><param name="method"><attribution license="cc4" from="Microsoft" modified="false" />A <see cref="T:System.Reflection.MethodInfo" /> that represents the method that encountered the exception.</param><param name="action"><attribution license="cc4" from="Microsoft" modified="false" />One of the <see cref="T:System.Security.Permissions.SecurityAction" /> values.</param><param name="demanded"><attribution license="cc4" from="Microsoft" modified="false" />The demanded permission, permission set, or permission set collection.</param><param name="permThatFailed"><attribution license="cc4" from="Microsoft" modified="false" />An <see cref="T:System.Security.IPermission" /> that represents the permission that failed.</param><param name="evidence"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Security.Policy.Evidence" /> for the assembly that caused the exception.</param></Docs></Member><Member MemberName="Action"><MemberSignature Language="C#" Value="public System.Security.Permissions.SecurityAction Action { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance valuetype System.Security.Permissions.SecurityAction Action" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Security.Permissions.SecurityAction</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="P:System.Security.SecurityException.Action" /> property contains the security action that caused the security check failure. Many of the security actions can cause a security exception to be thrown. For example, a demand on a permission set checks that all callers on the call stack have the necessary permissions in the permission set. If any caller on the call stack lacks a required permission, the security check fails. Alternatively, a method in the call chain can modify the outcome of the stack walk by placing a stack walk modifier, such as <see cref="F:System.Security.Permissions.SecurityAction.Deny" /> or <see cref="F:System.Security.Permissions.SecurityAction.PermitOnly" />, on the stack to limit the allowed permissions. For example, a method on the call stack might deny all of its callers a set of permissions named PSET1, such that any demand for a permission that is part of PSET1 fails for those callers. The <see cref="P:System.Security.SecurityException.Action" /> property contains the security action that caused the exception to be thrown.</para><para><see cref="T:System.Security.Permissions.SecurityAction" /> is an enumeration in the <see cref="T:System.Security.Permissions.SecurityAction" /> namespace that provides the security action value for the <see cref="P:System.Security.SecurityException.Action" /> property. Typically this property contains one of the values shown in the following table.</para><list type="table"><listheader><item><term><para>Security action </para></term><description><para>Description </para></description></item></listheader><item><term><para><see cref="F:System.Security.Permissions.SecurityAction.Demand" /></para></term><description><para>A full stack walk failed due to a demand made against the assembly identified by the <see cref="P:System.Security.SecurityException.FailedAssemblyInfo" /> property. </para></description></item><item><term><para><see cref="F:System.Security.Permissions.SecurityAction.LinkDemand" /></para></term><description><para>A link demand against the assembly identified by the <see cref="P:System.Security.SecurityException.FailedAssemblyInfo" /> property failed. </para></description></item><item><term><para><see cref="F:System.Security.Permissions.SecurityAction.InheritanceDemand" /></para></term><description><para>An assembly identified by the <see cref="P:System.Security.SecurityException.FailedAssemblyInfo" /> property failed to meet an inheritance demand. </para></description></item><item><term><para><see cref="F:System.Security.Permissions.SecurityAction.PermitOnly" /></para></term><description><para>A demanded permission did not match any permission in the <see cref="F:System.Security.Permissions.SecurityAction.PermitOnly" /> permission set. The method that placed the <see cref="F:System.Security.Permissions.SecurityAction.PermitOnly" /> on the call stack is identified by the <see cref="P:System.Security.SecurityException.Method" /> property. </para></description></item><item><term><para><see cref="F:System.Security.Permissions.SecurityAction.Deny" /></para></term><description><para>A demanded permission matched a permission in the deny permission set on the call stack. The method that placed the <see cref="F:System.Security.Permissions.SecurityAction.Deny" /> on the call stack is identified by the <see cref="P:System.Security.SecurityException.Method" /> property. </para></description></item></list></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the security action that caused the exception.</para></summary></Docs></Member><Member MemberName="Demanded"><MemberSignature Language="C#" Value="public object Demanded { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance object Demanded" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Object</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>In the case of a returned permission set or permission set collection, the returned object contains all the demanded permissions, one or more of which caused the failure.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the demanded security permission, permission set, or permission set collection that failed.</para></summary></Docs></Member><Member MemberName="DenySetInstance"><MemberSignature Language="C#" Value="public object DenySetInstance { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance object DenySetInstance" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Object</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property contains the denied permission, permission set, or permission set collection that caused the security check to fail. It is null for exceptions that are not caused by a Deny. The property is of type <see cref="T:System.Object" /> because it can contain a permission, a permission set, or a permission set collection. To test the run-time type of this property, you can use the <see cref="M:System.Object.GetType" /> method or a specific language operator, such as the <format type="text/html"><a href="bc62316a-d41f-4f90-8300-c6f4f0556e43">is</a></format> operator in C# or the <format type="text/html"><a href="33f65296-659a-4b9a-9a29-c2a91cff68b2">TypeOf</a></format> operator in Visual Basic.  </para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the denied security permission, permission set, or permission set collection that caused a demand to fail.</para></summary></Docs></Member><Member MemberName="FailedAssemblyInfo"><MemberSignature Language="C#" Value="public System.Reflection.AssemblyName FailedAssemblyInfo { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Reflection.AssemblyName FailedAssemblyInfo" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Reflection.AssemblyName</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property contains an <see cref="T:System.Reflection.AssemblyName" /> object that identifies the assembly that caused the security check to fail.</para><block subset="none" type="note"><para>This property is not populated when a security exception occurs in a <see cref="F:System.Security.Permissions.SecurityAction.Deny" /> or <see cref="F:System.Security.Permissions.SecurityAction.PermitOnly" /> stack frame, because the assembly issuing the <see cref="F:System.Security.Permissions.SecurityAction.Deny" /> or <see cref="F:System.Security.Permissions.SecurityAction.PermitOnly" /> security action is not the assembly that failed the stack walk. In these cases, the security exception is created with a constructor that does not require an assembly name, granted set information, or refused set information.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets information about the failed assembly.</para></summary></Docs></Member><Member MemberName="FirstPermissionThatFailed"><MemberSignature Language="C#" Value="public System.Security.IPermission FirstPermissionThatFailed { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Security.IPermission FirstPermissionThatFailed" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Security.IPermission</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>If the demanded object is a permission set or permission set collection, the <see cref="P:System.Security.SecurityException.FirstPermissionThatFailed" /> represents only the first permission that caused the exception. Additional permissions in the set or collection can also cause a demand failure.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the first permission in a permission set or permission set collection that failed the demand.</para></summary></Docs></Member><Member MemberName="GetObjectData"><MemberSignature Language="C#" Value="public override void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void GetObjectData(class System.Runtime.Serialization.SerializationInfo info, valuetype System.Runtime.Serialization.StreamingContext context) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="info" Type="System.Runtime.Serialization.SerializationInfo" /><Parameter Name="context" Type="System.Runtime.Serialization.StreamingContext" /></Parameters><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>GetObjectData sets a <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with all the exception object data targeted for serialization. During deserialization, the exception is reconstituted from the SerializationInfo transmitted over the stream.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Sets the <see cref="T:System.Runtime.Serialization.SerializationInfo" /> with information about the <see cref="T:System.Security.SecurityException" />.</para></summary><param name="info"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Runtime.Serialization.SerializationInfo" /> that holds the serialized object data about the exception being thrown. </param><param name="context"><attribution license="cc4" from="Microsoft" modified="false" />The <see cref="T:System.Runtime.Serialization.StreamingContext" /> that contains contextual information about the source or destination. </param></Docs></Member><Member MemberName="GrantedSet"><MemberSignature Language="C#" Value="public string GrantedSet { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance string GrantedSet" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property might not contain relevant data in security exceptions other than exceptions involving checks for the <see cref="T:System.Security.AllowPartiallyTrustedCallersAttribute" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the granted permission set of the assembly that caused the <see cref="T:System.Security.SecurityException" />.</para></summary></Docs></Member><Member MemberName="Method"><MemberSignature Language="C#" Value="public System.Reflection.MethodInfo Method { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Reflection.MethodInfo Method" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Reflection.MethodInfo</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property contains one of the following: </para><list type="bullet"><item><para>Information about the method that the failed assembly was executing when the security check that triggered the exception occurred.</para></item><item><para>Information about the method that placed either a <see cref="F:System.Security.Permissions.SecurityAction.PermitOnly" /> or <see cref="F:System.Security.Permissions.SecurityAction.Deny" /> security action on the call stack, in the case of a failure due to a <see cref="F:System.Security.Permissions.SecurityAction.PermitOnly" /> or <see cref="F:System.Security.Permissions.SecurityAction.Deny" />.</para></item><item><para>null, in the case of a failure that is impossible to attribute to a specific method.</para></item></list><para>The <see cref="T:System.Reflection.MethodInfo" /> object provides the method name, class name, and assembly name information that uniquely identifies the method.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the information about the method associated with the exception.</para></summary></Docs></Member><Member MemberName="PermissionState"><MemberSignature Language="C#" Value="public string PermissionState { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance string PermissionState" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks>To be added.</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the state of the permission that threw the exception.</para></summary></Docs></Member><Member MemberName="PermissionType"><MemberSignature Language="C#" Value="public Type PermissionType { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Type PermissionType" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Type</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks>To be added.</remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the type of the permission that failed.</para></summary></Docs></Member><Member MemberName="PermitOnlySetInstance"><MemberSignature Language="C#" Value="public object PermitOnlySetInstance { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance object PermitOnlySetInstance" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Attributes><Attribute><AttributeName>System.Runtime.InteropServices.ComVisible(false)</AttributeName></Attribute></Attributes><ReturnValue><ReturnType>System.Object</ReturnType></ReturnValue><Docs><value>To be added.</value><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="P:System.Security.SecurityException.PermitOnlySetInstance" /> property represents the permitted permission, permission set, or permission set collection contained in the stack frame that caused the security exception. For instance, when a security exception occurs because of a <see cref="M:System.Security.PermissionSet.Demand" /> failure, the permitted permission appears in this property and the demanded <see cref="T:System.Security.PermissionSet" /> is contained in the <see cref="P:System.Security.SecurityException.Demanded" /> property.</para><para>This property is of type <see cref="T:System.Object" /> because permissions, permission sets, or permission set collections can all be demanded and <see cref="T:System.Object" /> is their common base class.  To test the run-time type of this property, you can use the <see cref="M:System.Object.GetType" /> method or a specific language operator, such as the <format type="text/html"><a href="bc62316a-d41f-4f90-8300-c6f4f0556e43">is</a></format> operator in C# or the <format type="text/html"><a href="33f65296-659a-4b9a-9a29-c2a91cff68b2">TypeOf</a></format> operator in Visual Basic.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the permission, permission set, or permission set collection that is part of the permit-only stack frame that caused a security check to fail.</para></summary></Docs></Member><Member MemberName="RefusedSet"><MemberSignature Language="C#" Value="public string RefusedSet { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance string RefusedSet" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property might not contain relevant data in security exceptions other than exceptions involving checks for the <see cref="T:System.Security.AllowPartiallyTrustedCallersAttribute" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the refused permission set of the assembly that caused the <see cref="T:System.Security.SecurityException" />.</para></summary></Docs></Member><Member MemberName="ToString"><MemberSignature Language="C#" Value="public override string ToString ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>1.0.5000.0</AssemblyVersion><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Parameters /><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="M:System.Security.SecurityException.ToString" /> method returns the full description of the <see cref="T:System.Security.SecurityException" />.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns a representation of the current <see cref="T:System.Security.SecurityException" />.</para></summary><returns><attribution license="cc4" from="Microsoft" modified="false" /><para>A string representation of the current <see cref="T:System.Security.SecurityException" />.</para></returns></Docs></Member><Member MemberName="Url"><MemberSignature Language="C#" Value="public string Url { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance string Url" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.String</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks>To be added.</remarks><since version=".NET 2.0" /><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the URL of the assembly that caused the exception.</para></summary></Docs></Member><Member MemberName="Zone"><MemberSignature Language="C#" Value="public System.Security.SecurityZone Zone { get; set; }" /><MemberSignature Language="ILAsm" Value=".property instance valuetype System.Security.SecurityZone Zone" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Security.SecurityZone</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks>To be added.</remarks><since version=".NET 2.0" /><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Gets or sets the zone of the assembly that caused the exception.</para></summary></Docs></Member></Members><TypeExcluded>0</TypeExcluded></Type>