mscorlib(4.0.0.0) API with additions
|
The exception that is thrown when a security error is detected. More...
Public Member Functions | |
SecurityException () | |
Initializes a new instance of the T:System.Security.SecurityException class with default properties. More... | |
SecurityException (string message) | |
Initializes a new instance of the T:System.Security.SecurityException class with a specified error message. More... | |
SecurityException (string message, Type type) | |
Initializes a new instance of the T:System.Security.SecurityException class with a specified error message and the permission type that caused the exception to be thrown. More... | |
SecurityException (string message, Type type, string state) | |
Initializes a new instance of the T:System.Security.SecurityException class with a specified error message, the permission type that caused the exception to be thrown, and the permission state. More... | |
SecurityException (string message, Exception inner) | |
Initializes a new instance of the T:System.Security.SecurityException class with a specified error message and a reference to the inner exception that is the cause of this exception. More... | |
SecurityException (string message, AssemblyName assemblyName, PermissionSet grant, PermissionSet refused, MethodInfo method, SecurityAction action, object demanded, IPermission permThatFailed, Evidence evidence) | |
Initializes a new instance of the T:System.Security.SecurityException class for an exception caused by an insufficient grant set. More... | |
SecurityException (string message, object deny, object permitOnly, MethodInfo method, object demanded, IPermission permThatFailed) | |
Initializes a new instance of the T:System.Security.SecurityException class for an exception caused by a Deny on the stack. More... | |
override string | ToString () |
Returns a representation of the current T:System.Security.SecurityException. More... | |
override void | GetObjectData (SerializationInfo info, StreamingContext context) |
Sets the T:System.Runtime.Serialization.SerializationInfo with information about the T:System.Security.SecurityException. More... | |
![]() | |
SystemException () | |
Initializes a new instance of the T:System.SystemException class. More... | |
SystemException (string message) | |
Initializes a new instance of the T:System.SystemException class with a specified error message. More... | |
SystemException (string message, Exception innerException) | |
Initializes a new instance of the T:System.SystemException class with a specified error message and a reference to the inner exception that is the cause of this exception. More... | |
![]() | |
Exception () | |
Initializes a new instance of the T:System.Exception class. More... | |
Exception (string message) | |
Initializes a new instance of the T:System.Exception class with a specified error message. More... | |
Exception (string message, Exception innerException) | |
Initializes a new instance of the T:System.Exception class with a specified error message and a reference to the inner exception that is the cause of this exception. More... | |
virtual Exception | GetBaseException () |
When overridden in a derived class, returns the T:System.Exception that is the root cause of one or more subsequent exceptions. More... | |
override string | ToString () |
Creates and returns a string representation of the current exception. More... | |
new Type | GetType () |
Gets the runtime type of the current instance. More... | |
![]() | |
new bool | Equals (object obj) |
Provides COM objects with version-independent access to the M:System.Object.Equals(System.Object) method. More... | |
new int | GetHashCode () |
Provides COM objects with version-independent access to the M:System.Object.GetHashCode method. More... | |
Protected Member Functions | |
SecurityException (SerializationInfo info, StreamingContext context) | |
Initializes a new instance of the T:System.Security.SecurityException class with serialized data. More... | |
![]() | |
SystemException (SerializationInfo info, StreamingContext context) | |
Initializes a new instance of the T:System.SystemException class with serialized data. More... | |
![]() | |
Exception (SerializationInfo info, StreamingContext context) | |
Initializes a new instance of the T:System.Exception class with serialized data. More... | |
Properties | |
SecurityAction | Action [get, set] |
Gets or sets the security action that caused the exception. More... | |
Type | PermissionType [get, set] |
Gets or sets the type of the permission that failed. More... | |
IPermission | FirstPermissionThatFailed [get, set] |
Gets or sets the first permission in a permission set or permission set collection that failed the demand. More... | |
string | PermissionState [get, set] |
Gets or sets the state of the permission that threw the exception. More... | |
object | Demanded [get, set] |
Gets or sets the demanded security permission, permission set, or permission set collection that failed. More... | |
string | GrantedSet [get, set] |
Gets or sets the granted permission set of the assembly that caused the T:System.Security.SecurityException. More... | |
string | RefusedSet [get, set] |
Gets or sets the refused permission set of the assembly that caused the T:System.Security.SecurityException. More... | |
object | DenySetInstance [get, set] |
Gets or sets the denied security permission, permission set, or permission set collection that caused a demand to fail. More... | |
object | PermitOnlySetInstance [get, set] |
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. More... | |
AssemblyName | FailedAssemblyInfo [get, set] |
Gets or sets information about the failed assembly. More... | |
MethodInfo | Method [get, set] |
Gets or sets the information about the method associated with the exception. More... | |
SecurityZone | Zone [get, set] |
Gets or sets the zone of the assembly that caused the exception. More... | |
string | Url [get, set] |
Gets or sets the URL of the assembly that caused the exception. More... | |
![]() | |
virtual string | Message [get] |
Gets a message that describes the current exception. More... | |
virtual IDictionary | Data [get] |
Gets a collection of key/value pairs that provide additional user-defined information about the exception. More... | |
Exception | InnerException [get] |
Gets the T:System.Exception instance that caused the current exception. More... | |
MethodBase | TargetSite [get] |
Gets the method that throws the current exception. More... | |
virtual string | StackTrace [get] |
Gets a string representation of the immediate frames on the call stack. More... | |
virtual string | HelpLink [get, set] |
Gets or sets a link to the help file associated with this exception. More... | |
virtual string | Source [get, set] |
Gets or sets the name of the application or the object that causes the error. More... | |
int | HResult [get, protected set] |
Gets or sets HRESULT, a coded numerical value that is assigned to a specific exception. More... | |
EventHandler< SafeSerializationEventArgs > | SerializeObjectState |
Occurs when an exception is serialized to create an exception state object that contains serialized data about the exception. More... | |
![]() | |
string | Message [get] |
Provides COM objects with version-independent access to the P:System.Exception.Message property. More... | |
string | StackTrace [get] |
Provides COM objects with version-independent access to the P:System.Exception.StackTrace property. More... | |
string | HelpLink [get, set] |
Provides COM objects with version-independent access to the P:System.Exception.HelpLink property. More... | |
string | Source [get, set] |
Provides COM objects with version-independent access to the P:System.Exception.Source property. More... | |
Exception | InnerException [get] |
Provides COM objects with version-independent access to the P:System.Exception.InnerException property. More... | |
MethodBase | TargetSite [get] |
Provides COM objects with version-independent access to the P:System.Exception.TargetSite property. More... | |
The exception that is thrown when a security error is detected.
Definition at line 19 of file SecurityException.cs.
System.Security.SecurityException.SecurityException | ( | ) |
Initializes a new instance of the T:System.Security.SecurityException class with default properties.
Definition at line 364 of file SecurityException.cs.
System.Security.SecurityException.SecurityException | ( | string | message | ) |
Initializes a new instance of the T:System.Security.SecurityException class with a specified error message.
message | The error message that explains the reason for the exception. |
Definition at line 373 of file SecurityException.cs.
System.Security.SecurityException.SecurityException | ( | string | message, |
Type | type | ||
) |
Initializes a new instance of the T:System.Security.SecurityException class with a specified error message and the permission type that caused the exception to be thrown.
message | The error message that explains the reason for the exception. |
type | The type of the permission that caused the exception to be thrown. |
Definition at line 383 of file SecurityException.cs.
System.Security.SecurityException.SecurityException | ( | string | message, |
Type | type, | ||
string | state | ||
) |
Initializes a new instance of the T:System.Security.SecurityException class with a specified error message, the permission type that caused the exception to be thrown, and the permission state.
message | The error message that explains the reason for the exception. |
type | The type of the permission that caused the exception to be thrown. |
state | The state of the permission that caused the exception to be thrown. |
Definition at line 396 of file SecurityException.cs.
System.Security.SecurityException.SecurityException | ( | string | message, |
Exception | inner | ||
) |
Initializes a new instance of the T:System.Security.SecurityException class with a specified error message and a reference to the inner exception that is the cause of this exception.
message | The error message that explains the reason for the exception. |
inner | The exception that is the cause of the current exception. If the inner parameter is not null , the current exception is raised in a catch block that handles the inner exception. |
Definition at line 409 of file SecurityException.cs.
|
protected |
Initializes a new instance of the T:System.Security.SecurityException class with serialized data.
info | The object that holds the serialized object data. |
context | The contextual information about the source or destination. |
T:System.ArgumentNullException | info is null . |
Definition at line 453 of file SecurityException.cs.
System.Security.SecurityException.SecurityException | ( | string | message, |
AssemblyName | assemblyName, | ||
PermissionSet | grant, | ||
PermissionSet | refused, | ||
MethodInfo | method, | ||
SecurityAction | action, | ||
object | demanded, | ||
IPermission | permThatFailed, | ||
Evidence | evidence | ||
) |
Initializes a new instance of the T:System.Security.SecurityException class for an exception caused by an insufficient grant set.
message | The error message that explains the reason for the exception. |
assemblyName | An T:System.Reflection.AssemblyName that specifies the name of the assembly that caused the exception. |
grant | A T:System.Security.PermissionSet that represents the permissions granted the assembly. |
refused | A T:System.Security.PermissionSet that represents the refused permission or permission set. |
method | A T:System.Reflection.MethodInfo that represents the method that encountered the exception. |
action | One of the T:System.Security.Permissions.SecurityAction values. |
demanded | The demanded permission, permission set, or permission set collection. |
permThatFailed | An T:System.Security.IPermission that represents the permission that failed. |
evidence | The T:System.Security.Policy.Evidence for the assembly that caused the exception. |
Definition at line 503 of file SecurityException.cs.
System.Security.SecurityException.SecurityException | ( | string | message, |
object | deny, | ||
object | permitOnly, | ||
MethodInfo | method, | ||
object | demanded, | ||
IPermission | permThatFailed | ||
) |
Initializes a new instance of the T:System.Security.SecurityException class for an exception caused by a Deny on the stack.
message | The error message that explains the reason for the exception. |
deny | The denied permission or permission set. |
permitOnly | The permit-only permission or permission set. |
method | A T:System.Reflection.MethodInfo that identifies the method that encountered the exception. |
demanded | The demanded permission, permission set, or permission set collection. |
permThatFailed | An T:System.Security.IPermission that identifies the permission that failed. |
Definition at line 547 of file SecurityException.cs.
|
virtual |
Sets the T:System.Runtime.Serialization.SerializationInfo with information about the T:System.Security.SecurityException.
info | The T:System.Runtime.Serialization.SerializationInfo that holds the serialized object data about the exception being thrown. |
context | The T:System.Runtime.Serialization.StreamingContext that contains contextual information about the source or destination. |
T:System.ArgumentNullException | The info parameter is null . |
Reimplemented from System.Exception.
Definition at line 660 of file SecurityException.cs.
override string System.Security.SecurityException.ToString | ( | ) |
Returns a representation of the current T:System.Security.SecurityException.
Implements System.Runtime.InteropServices._Exception.
Definition at line 650 of file SecurityException.cs.
|
getset |
Gets or sets the security action that caused the exception.
Definition at line 78 of file SecurityException.cs.
|
getset |
Gets or sets the demanded security permission, permission set, or permission set collection that failed.
Definition at line 152 of file SecurityException.cs.
|
getset |
Gets or sets the denied security permission, permission set, or permission set collection that caused a demand to fail.
Definition at line 201 of file SecurityException.cs.
|
getset |
Gets or sets information about the failed assembly.
Definition at line 235 of file SecurityException.cs.
|
getset |
Gets or sets the first permission in a permission set or permission set collection that failed the demand.
Definition at line 119 of file SecurityException.cs.
|
getset |
Gets or sets the granted permission set of the assembly that caused the T:System.Security.SecurityException.
Definition at line 168 of file SecurityException.cs.
|
getset |
Gets or sets the information about the method associated with the exception.
Definition at line 252 of file SecurityException.cs.
|
getset |
Gets or sets the state of the permission that threw the exception.
Definition at line 135 of file SecurityException.cs.
|
getset |
Gets or sets the type of the permission that failed.
Definition at line 92 of file SecurityException.cs.
|
getset |
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.
Definition at line 218 of file SecurityException.cs.
|
getset |
Gets or sets the refused permission set of the assembly that caused the T:System.Security.SecurityException.
Definition at line 184 of file SecurityException.cs.
|
getset |
Gets or sets the URL of the assembly that caused the exception.
Definition at line 287 of file SecurityException.cs.
|
getset |
Gets or sets the zone of the assembly that caused the exception.
Definition at line 273 of file SecurityException.cs.