Due to ongoing issues with ASP.NET MVC 4 and WebAPI, see link:
MVC 4 Web API – CreateResponse(status, object) causes HTTP 500
I need to instrument the internal Web API pipeline and see what’s going on.
How do I do this?
Thanks
Luke
**UPDATE **
I have an ITraceWriter now implemented and I can now see that there’s an Exception property on the TraceRecord which I can dump or even break around, maybe.
Thanks, I think answers the question.
More info here:
http://www.asp.net/web-api/overview/testing-and-debugging/tracing-in-aspnet-web-api
you can enable all levels of tracing (from the basic, “info” tracing) for the entire stack.
If you use one of the popular libraries (i.e. nLog), you can easily write it all to file or event log if you wish.
just replace the default ITraceWriter with your custom class:
You’ll see all kinds of internal tracing messages filling up the logs.
I blogged about that here http://www.strathweb.com/2012/06/using-nlog-to-provide-custom-tracing-for-your-asp-net-web-api/