Error encountered: Requested registry access is not allowed, System.Security.SecurityException

Problem:
You have a dotnet application that reads key/value to the local registry but is restricted so you get the error.

Solution:
1.) Goto run and type regedit, the "Registry Editor" window will open.
2.) Navigate to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Security
3.) Right click on this folder and select "Permissions...", "Permissions for Security" window will open.
4.) Click Add then Advanced and finally click Find Now, in the lower part select ASPNET name (RDN).
5.) Click ok, ok then below "Permissions for ASP.NET Machine Account" click Read.
6.) Click ok then restart IIS.

How to restart IIS
1.) Open Control Panel->Administrative Tools->Internet Information Services
2.) Under Local Computer->Web Sites->Default Web Site click Stop Item then Start Item.
Error encountered: Requested registry access is not allowed, System.Security.SecurityException Error encountered: Requested registry access is not allowed, System.Security.SecurityException Reviewed by czetsuya on Wednesday, April 22, 2009 Rating: 5

No comments:

Powered by Blogger.