PRB: “Requested Registry Access Is Not Allowed” Error Message When ASP.NET Application Tries to Write New EventSource in the EventLog
Symptoms
When you use ASP.NET to create a new event source in the event log, you may receive the following error message:
System.Security.SecurityException: Requested registry access is not allowed.
Resolution
By default, the user token of the ASP.NET worker process is ASPNET (or NetworkService for applications that run on Internet Information Services [IIS] 6.0). The problem in the “Symptoms” section occurs because your account does not have the correct user rights to create an event source.
