Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
UnauthorizedAccessException Class
Collapse the table of content
Expand the table of content

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.

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


[Visual Basic]
Public Class UnauthorizedAccessException
   Inherits SystemException
public class UnauthorizedAccessException : SystemException
public __gc class UnauthorizedAccessException : public
class UnauthorizedAccessException 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.


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


Namespace: System

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: Mscorlib (in Mscorlib.dll)

See Also

UnauthorizedAccessException Members | System Namespace | Exception | Handling and Throwing Exceptions

© 2015 Microsoft