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)