System.UnauthorizedAccessException Class

The exception that is thrown when the operating system denies access because of an I/O error or a specific type of security error.

See Also: UnauthorizedAccessException Members

Syntax

[System.Runtime.InteropServices.ComVisible(true)]
public class UnauthorizedAccessException : SystemException

Remarks

An UnauthorizedAccessException exception is typically thrown by a method that wraps a Windows API call. To find the reasons for the exception, examine the text of the exception object's Exception.Message property.

UnauthorizedAccessException uses the HRESULT COR_E_UNAUTHORIZEDACCESS, which has the value 0x80070005.

Thread Safety

All public static members of this type are safe for multithreaded operations. No instance members are guaranteed to be thread safe.

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0