Have you ever come across the error below with one of your ASP.NET web apps that is trying to write to the Eventlogs? If so, read on…
By default the ASPNET user cannot access the existing eventlogs categories. To resolve this, you must set the permissions in the Eventlog key in the registry:
- Launch RegEdit.
- Navigate to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\EventLog\.
- From the menu, select Edit->Permissions.
- Click the Add button and write ASPNET (if ASP.NET is running under a different User ID, use that ID instead).
- Click OK.
- Select the newly added user from the list (ASP.NET Machine User by default).
- Click on Full Control in the Allow column. 8. Click OK.
More info here.