I have an ASP.NET-based web app on Azure with a Web API. Yesterday, I started to get exceptions from the app whenever one of the API calls was invoked.

I don't have an exception logger intercepting application exceptions at the moment, however, I do have audit logging on each of the API calls which 99% of the time catches exceptions and reports problems to me.

In this particular case, it appears an exception is occurring further up the stack from the audit logging. There's not much code I have written which is invoked above there to be honest. There is also an IIS error page configured, so exception information is not passed down to the client. I have had a look in the event log and there's nothing in there.

In reaction to the problem, I spun up a new Azure instance, made that live and relegated the problematic instance to staging. The new instance works fine. If I restart the (now) staging instance by reconfiguring web.config to disable IIS errors then that instance will also work fine!

So does anyone know how I can extract unhandled exception information from a running app domain without having to restart it or affect it in any way?

I will be putting exception logging in soon, don't worry :-) But if there is a way to crack this without having to wait for another occurrence of the problem then that would be great!

UPDATE: I logged onto the server and managed to get the following information from the "detailed response":

HTTP Error 500.0 - Internal Server Error The page cannot be displayed because an internal server error has occurred. Detailed Error Information:

Module ManagedPipelineHandler

Notification ExecuteRequestHandler

Handler System.Web.Http.WebHost.HttpControllerHandler

Error Code 0x00000000

Requested URL http:// 10.77.52.122:80/api/Login

Physical Path E:\sitesroot\0\api\Login

Logon Method Anonymous

Logon User Anonymous

Request Tracing Directory
C:\Resources\directory\34c6b40352d4449d8a19274caa328300.Web.UI.DiagnosticStore\FailedReqLogFiles\Web

I then configured Failed Request Tracing - which promptly made the error go away!

Anyone have any ideas? I'm probably going to have to wait for it to happen again, but by then there'll be some more exception logging.

thanks Kris

share|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.