Windows 7 Application Log doesn't show error message

Topics: Exception Handling Application Block, General discussion, Logging Application Block
Jul 12, 2010 at 9:35 PM
Hi team, Enterprise Library 5 writes error message into Windows Application Log successfully on machine with Windows XP OS. I see no error message when I deploy the same code on machine with Windows 7 OS. Do I need to make any additional settings in configuration file? Thank you
Jul 13, 2010 at 3:51 AM
Edited Jul 13, 2010 at 3:51 AM

See FAQ item if it may help

I suspect what are you missing here is that the event source that you're using are not yet registered in your Windows 7. Event sources must be registered with the operating system before you can successfully log using them. Normally the .NET framework will automatically create event sources the first time you use them, but creating event sources require administrator privileges. As such, any applications without admin rights (like almost all web applications) cannot create the event source and logging fails.

 When deploying your application, you should include an installer class to create your event sources. You can check using the EventLogInstaller Class on how to create your own installer.

Gino Terrado
Global Technology and Solutions
Avanade, Inc.