Get rid of logging errors in Enterprise Library

I have been experiencing a lot of weird problems when running the Data Block from a Web service on a Windows 2003 server. Googling around the web a bit revealed that I am not the only person experience these exact problems. My main problem has been with the following message:

System.InvalidOperationException: Cannot open log for source 'Enterprise Library Data Service'.
 You may not have write access.

I have tried all the proposed solutions with varying degrees of success most of the time the fix will work for a while or for a specific testing scenario but will stop working when the source changes. I think our problem is worsened by the fact that we are running everything through Visual Studio 2005 and Team Build with automated tests. Maybe the proposed solutions (installutil and registry permissions) would work when we go into production but I just don’t feel confident that the system will run smoothly. As a last resort I have removed all the instrumentation stuff and recompiled it.

For anyone else who is searching for a resolution these are links to the sources I have used:
Tom Hollands blog about instrumentation in Enterprise Library:
Install util fix:
Give ASPNET user write access to the Enterprise Library logs:
Remove instrumentation:

The fixes didn’t work for us in the automated build, perhaps it would work if i added a task to the MSBuild in Team Build that ran the installutil script after each compilation of the web site and set the right registry permissions but for now I am just going to go with disabled instrumentation. We aren’t planning on using it but I know it could be good to have in the future!

One Response to “Get rid of logging errors in Enterprise Library”

Read below or add a comment...

  1. Blessing says:

    This info is the cat’s pmjaaas!

Leave A Comment...