Microsoft Enterprise Library 5.0 - Hands On Labs Issue

Topics: Logging Application Block
Dec 4, 2011 at 8:06 PM

Hello EntLib Team,

I downloaded the Microsoft Enterprise Library 5.0, I tested the logging exercice#1 and it didn't work.

The problem is when I open the solution in the end folder and I after I run the app, I open the events viewer

and there no corresponding event.

Thank you in advance,

Kindest regards,

Maher Jendoubi.

Dec 4, 2011 at 9:39 PM
Edited Dec 4, 2011 at 10:00 PM

It sounds like a permission issue.  In order to write to the event log for the first time the program will have to create an event source in the
registry (this happens under the covers).  That means it will have to have permission to create registry keys under 


When I run as a standard user I also don't see any EventLog entries.  So either grant permission on the registry to the account you are using
or (even easier) browse to EnoughPI.exe (e.g. in bin\debug) right click and select "Run as administrator".  Then the log entries will be created.
When you run as administrator once, the registry keys are set up so you can then create new log entries as a Standard User.

Randy Levy
Enterprise Library support engineer

Dec 4, 2011 at 9:56 PM

Thank you Randy for this clear response. The issue is resolved.

Best regards,

Maher Jendoubi.