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.
Other Posts you might also like