Wednesday, February 28, 2007

Events not showing up in EventLog

At some point ASP.Net web applications stopped being able to log to the event log. There are a few ways this can be fixed. Follow one of the suggestions in this tech note from Microsoft: http://support.microsoft.com/kb/329291 Give Network Service or ASP.Net permissions using regedit.exe (not regedit32 as it is broken). Give permissions to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog and right-click. Choose Security Permissions. Give the account that your application runs under Full Control of the key and all subkeys
  • If deploying in IIS 5 (for example: Windows XP Professional) Give the ASPNET account Full Control.
  • If deploying in IIS 6 (for example: Windows Server 2003) Give the NETWORK SERVICE account Full Control. NOTE: If running your application pool under a different user than NETWORK SERVICE, then give that user account Full Control instead of NETWORK SERVICE. This is the user that the process will run under.
Warning: Option 2 doesn't seem to help if application is trying to write to Security log. If you create the key manually as Option 1 suggests you will need add another registry key as explained in the following entry I wrote. http://justgeeks.blogspot.com/2007/10/aspnet-and-eventlog-event-id-issues_1860.html

2 comments:

Jeff said...

Thank goodness for this posting. I can never remember how to fix this occurrance!

digital signatures said...

Yes, it happens several times that events are not shown in EventLog. I used the same method which you explained in this post to overcome this problem. This is the easiest method to get rid of this problem. Thanks for your post.