Trace.Warn does not display trace messages in MVC

It doesn't seem to work like in ASP.NET web formats? Any ideas?

+4
source share
2 answers

This is normal, Trace no longer works in ASP.NET MVC, as in classic WebForms. You can check glimpse instead provide similar and additional functions.

+7
source

While it does not work exactly the same as in web forms, tracing still works to some extent in MVC. You just do not get access to the page. You can enable tracing in web.config and use HttpContext.Trace.Write and HttpContext.Trace.Warn . You can get the results by Trace.axd , although it doesn't seem to want to work in Views, but then you would not have the logic that you want to track there anyway ...

I would agree that Glimpse is a powerful tool.

+2
source

All Articles