How do I log from asp.net to Event Log?

by Mikael Henriksson 27. January 2009 19:00

This has been bugging me for quite some time with throwing exceptions when I try to log from an asp.net page to Event Log. The solution is quite simple but it eludes me why nothing has been written about. At least not anywhere I have looked.

  1. Go to run (win+r) type in regedt32.
  2. Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\EventLog
  3. Right click, select permissions and Add the ASPNET account (IUSR as well????) with full rights
  4. Make sure that all child objects get the same rights

Done, now you can start logging to the event log.

Tags:

Windows Server

blog comments powered by Disqus