Share via


Troubleshooting Exceptions: System.UnauthorizedAccessException 

An UnauthorizedAccessException exception is thrown when the operating system denies access because of an I/O error or a security error.

Associated Tips

  • If you are attempting to access a file or registry key, make sure it is not read-only.
    For more information, see Requesting Permissions.

See Also

Tasks

How to: Find Out More About an Exception with the Exception Assistant
How to: Create a File in Visual Basic
How to: Create a Registry Key and Set Its Values in Visual Basic

Reference

UnauthorizedAccessException