1 vote
fixed
Logging Under Medium Trust

Description

 
Make sure logging works under medium trust.

File Attachments


No files are attached


Comments

most recent at top (show oldest at top)
nberardi wrote Nov 13 at 12:14 PM
Yeah I had to actually create my own logging framework, a very basic framework, but gets the job done for logging text data to the disk.

Syntess_EJ wrote Nov 12 at 12:29 PM
Does this include a workaround for the Trace.Listeners collection throwing exceptions (security) on .Add and .Remove ?
See http://forums.asp.net/p/1204436/2105143.aspx for an example.

My hosting uses Medium Trust , and custom listeners cannot be added to the Listeners collection without raising an exception.
As a workaround, I've disabled the TRACE constant on a custom Release build and wrapped the two Trace.Listeners.(Add|Remove) lines in ApacheRuleSet.cs in #if TRACE #endif directives.
A better solution would be to wrap all logging in a custom class to be independent of the actual logging framework and its availability.

Updating...
© 2006-2009 Microsoft | About CodePlex | Privacy Statement | Terms of Use | Code of Conduct | Advertise With Us | Version 2009.10.27.15987