views:

1051

answers:

2

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?

+3  A: 

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.

A: 

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.

Charlie Salts
actually if you read the above... that was the root cause. More permissions issue than anything.