Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enterprise Library Logging Block not logging

I'm having an issue with the 3.1 version of the logging application block...

With 3.5 framework my application works fine on my desktop... once it's deployed out to our qa box... the logging ceases to function. The web.config is identical in both scenarios. Any ideas? Permissions issue?

After a quick diagnosis... turns out it works while compiled in debug mode but not release... any one know of a setting to change to get this to work in release mode?

like image 464
user38734 Avatar asked Dec 30 '08 19:12

user38734


2 Answers

Well I found the issue so I will post it in case anyone else runs into the same issue. It all has to do with permissions on our target machine we are deploying to. While our dev environment was "deployed" using the built in web server via visual studio, our integration environment was a 2003 server (hopefully your seeing where I'm going with this). Turns out to be a permissions issue with the default application pool settings with iis. Running under network privs does not allow you to access the event log and no error is generated (note this is a real pain). If you move it to local system account... everything works fine (though it's not recommended). There is a section in the documentation of the EntLib for running under partial trust which is where you can find most of the information you need.

like image 196
user38734 Avatar answered Oct 31 '22 17:10

user38734


I know that

System.Diagnostics.Debug.Assert(conditionToTest, "Message when assert fails");

runs only when the conditional compiler directive DEBUG is defined. I suspect something similar is happening in your case.

like image 1
Charlie Salts Avatar answered Oct 31 '22 17:10

Charlie Salts