NSilverBullet

Complex solutions for simple problems.

  • All posts in the month of August, 2005

Get rid of logging errors in Enterprise Library


Thursday 11 August, 2005 (.Net | Bugs | Fixes)

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:
http://blogs.msdn.com/tomholl/archive/2005/02/18/376187.aspx
Install util fix:
http://codebetter.com/blogs/eric.wise/archive/2005/03/21/60163.aspx
Give ASPNET user write access to the Enterprise Library logs:
http://objectsharp.com/blogs/bruce/archive/2003/11/03/180.aspx
Remove instrumentation:
http://dotnetjunkies.com/WebLog/sskokku/archive/2005/03/25/61376.aspx

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!

Comments [0]


My first entry!


Wednesday 10 August, 2005 (Ramblings)

Ok, I have been thinking about starting a blog for a couple of months now but haven't got round to it until now. I have also been uncertain about how I will use it and what to post, I am still not sure but tonight I thought "Hey! Let's give it a shot!".

My aim is to blog about .NET related development issues primarily my views on current topics, code samples/fixes and links to sources that I use. Anyway enough of these preramblings (lets see if my post will even save).

Comments [0]