Windows Event Log not getting updated

Topics: Exception Handling Application Block
Aug 23, 2010 at 12:09 PM

Dear Friends,

I am using EntLib 5.0 Hands on Lab - Exception Handling - Puzzler UI.  As per the instructions, given in Exception Handling instructions CS.pdf, in Page 9 it should write the exception details to the Event Log.  But I cannot find anything written in my Event Log.

The same page mentions this statement -"You must run the application at least once using an account that has administrative permissions on the machine to allow entries to be logged". What does this statement mean?  My windows User ID is part of Administrators group!

Am I missing something.  Please advice.



Aug 23, 2010 at 3:59 PM
Edited Aug 23, 2010 at 4:00 PM

The reason for the statement is because when writing to the event log, if a Source name has not been registered yet, the software will try to register it and that registration requires administrator permissions.  Once the source has been registered on the machine, the logging only requires rights to write to the event log, but does not require administrative permissions.

As for why you are not getting anything in the log, I have no idea.  :)

Aug 23, 2010 at 4:35 PM

Are you running on Vista or later? If so, just because you're in the administrator group doesn't mean you're running with administrative permissions - you have to explicitly elevate first. Right click on your shortcut to VS and select "Run as administrator", say yes to the UAC prompt, and then you should be good to go. You'll only need to run this way one to register the event source, afterwards you can run VS normally.


Aug 25, 2010 at 3:37 PM

@dparvin and @ctavares - I am using Windows XP Professional SP3 and I am part of local Administrators group.  Any further suggestion to fix this problem?

Sep 2, 2010 at 12:06 PM

See if this thread would help

Gino Terrado
Global Technology and Solutions
Avanade, Inc.