Geeks With Blogs
Bryan Corazza for ( ; ; ) { BizTalk, Workflow, and .NET }

I needed to put this up for my own reference because this issue has been plaguing my entire
department of developers.  A developer wants to be on the up and up and attempts to use
Enterprise Library's data or logging blocks and runs tests on their local machines and
everything seems to work fine (as they always do!) and once the code is deployed on a
Windows Server 2003 the same code is blowing up when
entering the logging or data block saying:

[Win32Exception (0x80004005): Access is denied]

[InvalidOperationException: Cannot open log for source {0}. You may not have write access.]

Well after trying every registry hack in the book and double checking all IIS security settings I
came across this blog entry.  Very Helpful.  We are now up and running.

        -B

ps.  I am also very happy to report that this entire issue has been 'fixed' in the June 2005 release of Enterprise Library (v1.1).  Please download and enjoy.

Seems that there was an issue with the way that the Logging Block was accessing the Event Source and trying to access the Event Log.  (Thanks Matt)

 

Posted on Wednesday, June 8, 2005 12:50 PM General .NET | Back to top


Comments on this post: Enterprise Library and ASP.NET can get along after all

# re: Enterprise Library and ASP.NET can get along after all
Requesting Gravatar...
I've tried everything and keep going back and seeing if there's new info on making this work with the instrumentation/event log code enabled. It's been MONTHS. I just plain can't get it to work.

My solution is still to simply comment out the offending lines.

-Ben
Left by Benjamin Day on Jun 27, 2005 8:43 AM

# re: Enterprise Library and ASP.NET can get along after all
Requesting Gravatar...
I have read that too. As long as it works for you and it is not too much of a hack go with it. I know lots of devs this is happening for and sometimes I wonder why mine works and most everyone I talk to it doesn't. Good luck.
Left by Bryan on Jun 27, 2005 8:47 AM

# re: Enterprise Library and ASP.NET can get along after all
Requesting Gravatar...
What suggestion did you follow in that referenced blog entry to make it work?
Left by Arthur on Sep 01, 2005 5:04 AM

# re: Enterprise Library and ASP.NET can get along after all
Requesting Gravatar...
The link to the blog does not work. I'm having this problem too and need to resolve this to make my application work.
Left by anand on Oct 14, 2005 7:32 AM

# re: Enterprise Library and ASP.NET can get along after all
Requesting Gravatar...
In my case, the problem was fixed with setting 'Full Control' permission in the registry on the key 'HKLM\SYSTEM\CurrentControlSet\Services\EventLog\Application\Enterprise Library Instrumentation' for the 'NETWORK SERVICE' user ( Right-Click on the key 'Permissions...').

If we look into the code, at the place where the EventLog object is created, we can find the log source name is stored in the SR.strings file from the Common project in the source code.

Since I have tried a lot of things before doing that, I can be sure this simple change is the solve of the problem but it has worked from this change for me.
Left by Christophe on Oct 27, 2005 2:07 AM

Your comment:
 (will show your gravatar)


Copyright © Bryan Corazza | Powered by: GeeksWithBlogs.net