Contact   •   Products   •   Search

Rick Strahl's Web Log

Wind, waves, code and everything in between...
ASP.NET • C# • HTML5 • JavaScript • AngularJs

Debugger Visualizers not working in ASP.NET Medium Trust


So imagine you are running your ASP.NET application’s in medium trust and you want to access a debugger visualizer like this:

VisualizeThis

by clicking on the little search icon in the debugger tooltip, you run into a message like this:

The application you are debugging has insufficient privileges to allow the use of custom visualizers

or more visually here failing with a DataTable visualizer:

 DebuggerVisualizerAspNet

Ah yes, see the documentation. I know I should have read that one page pamphlet Microsoft ships for documentation with ASP.NET. Right.

The problem is that the application needs to run in Full trust in order to use debugger visualizers. This can be changed in Web.config by making sure that the trust key :

<system.web>
  <trust level="Full" />
</system.web
>

is set to Full trust.

DebuggerVisualizer

Debugger visualizers can come from many sources so the security environment for the visualizers is different than than main debugger and as such it requires explicit permissions to execute.

Be careful with these settings though. For production sites it’s recommended you run in Medium trust, so if you change settings in your local config file remember not to send them up to the server. Better yet, change the settings only while you need it for debugging and then set it back.

I run into this frequently because I try to set up my Web sites during development with Medium trust if I can to see all the places when and if I run into problems. So I often end up having to change that switch temporarily for debugging and then setting it back when I’m done with this task.

Make Donation
Posted in ASP.NET   Visual Studio  


Feedback for this Post

 
# re: Debugger Visualizers not working in ASP.NET Medium Trust
by JK September 24, 2009 @ 8:32am

I just love these short but useful bits of info that will make my job easier some day. Its a quick read too in this case. Sometimes I don't have time for a more in depth posting.
# Debugger Visualizers not working in ASP.NET Medium Trust
by PimpThisBlog.com September 24, 2009 @ 8:35am
Thank you for submitting this cool story - Trackback from PimpThisBlog.com
# re: Debugger Visualizers not working in ASP.NET Medium Trust
by Venkat February 13, 2011 @ 5:03am
Hi Rick,

You always my favorite while solving the ASP.Net problems

Thanks
- Venkat
 


West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2014