System.Security.SecurityException Class

public class SecurityException : SystemException

Base Types

Object
  Exception
    SystemException
      SecurityException

Assembly

mscorlib

Library

BCL

Summary

Represents the error that occurs when an application does not have the permissions required to access a resource or perform a secured operation.

Description

[Note: For more information about permissions and security, see Partition V of the CLI specification.

The following CIL instructions throw SecurityException:

]

See Also

System.Security Namespace

Members

SecurityException Constructors

SecurityException() Constructor
SecurityException(System.String) Constructor
SecurityException(System.String, System.Exception) Constructor


SecurityException() Constructor

public SecurityException();

Summary

Constructs and initializes a new instance of the SecurityException class.

Description

This constructor initializes the System.Security.SecurityException.Message property of the new instance to a system-supplied message that describes the error, such as "A security violation has occurred." This message takes into account the current system culture.

The System.Security.SecurityException.InnerException property of the new instance is initialized to null .

See Also

System.Security.SecurityException Class, System.Security Namespace

SecurityException(System.String) Constructor

public SecurityException(string message);

Summary

Constructs and initializes a new instance of the SecurityException class.

Parameters

message
A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.

Description

This constructor initializes the System.Security.SecurityException.Message property of the new instance using message. If message is null , the System.Security.SecurityException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.

The System.Security.SecurityException.InnerException property of the new instance is initialized to null .

See Also

System.Security.SecurityException Class, System.Security Namespace

SecurityException(System.String, System.Exception) Constructor

public SecurityException(string message, Exception inner);

Summary

Constructs and initializes a new instance of the SecurityException class.

Parameters

message
A String that describes the error. The content of message is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture.
inner
An instance of SecurityException that is the cause of the current exception. If inner is non-null, then the current Exception was raised in a catch block handling inner.

Description

This constructor initializes the System.Security.SecurityException.Message property of the new instance using message and the System.Security.SecurityException.InnerException property using inner. If message is null , the System.Security.SecurityException.Message property is initialized to the system-supplied message provided by the constructor that takes no arguments.

[Note: For more information on inner exceptions, see System.Exception.InnerException.]

See Also

System.Security.SecurityException Class, System.Security Namespace