Posting the Stack Trace on ASP.NET MVC

2019-05-30 01:30发布

问题:

In ASP.NET web forms, I can post the stack trace simply by declaring <trace enabled="true" requestLimit="40" localOnly="false" pageOutput="true" /> in my Web.config. But this doesn't seem to work in ASP.NET MVC (3.0, currently).

Is there any way to get the same result, where the trace is listed on each page, in MVC?

回答1:

The way I have always done this is by navigating to http://localhost:port/trace.axd after you make the request to the page.

The trace enabled entry needs to be in the web.config (as you have in your question).