So imagine you are running your ASP.NET application’s in medium trust and you want to access a debugger visualizer like this:
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:
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 :
<trust level="Full" />
is set to Full trust.
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.
I'll be at DevIntersection in Vegas this fall giving sessions on ASP.NET Core with Angular and Localization. Thinking of coming? Use discount code STRAHL and save a few bucks. If you do be sure to stop by and say hello!
Other Posts you might also like