It开发者_C百科 doesn't seem to work like it did in ASP.NET webforms? Any ideas?
That's normal, Trace
no longer works in ASP.NET MVC as it did in classic WebForms. You may checkout Glimpse instead which provides similar and additional functionalities.
While it doesn't work in exactly the same way as in Web Forms, Tracing still works to some extent in MVC. You just don't get the page output. You can still enable tracing in the web.config and use HttpContext.Trace.Write
and HttpContext.Trace.Warn
. You can get to the results by requesting Trace.axd
, although it doesn't appear to want to work in Views, but then you wouldn't have logic you want to track there anyway...
I would agree that Glimpse is a strong tool.
精彩评论