Description

Some exceptions don't cause your application to crash. Some do. Either way, developers should work to rid their applications of exceptions for both stability and performance reasons. Special guest Mario Hewardt joins us as we discuss how to detect the presence of these exceptions, how to gather vital data on them in a relatively non-intrusive fashion, and how to find root cause. And since this is all done in the production environment, we won't have Visual Studio available.

The Discussion

I have an application with an issue that only happens in prod. It's an intermittent problem occurring anywhere from once/twice a day to once a week or every other week. When it happens the server will pick a seemingly random .css or .js file to give 302 redirects back to the forms auth. login page. Restarting the app pool fixes the issue but I'm at a loss with how to debug it. It's not an error, not a performance issue, no CPU or memory spikes, it just stops serving that .css or .js file! Using the standard forms auth. provider. Any idea what I can look for or how to debug this issue?? Please!- Jim

@Jim:The hardest issues to start troubleshooting are the ones that A) don't repro reliably, and B) repro infrequently.There are many variables that could come into play with your issue (OS, load balancer configuration, etc., etc.) You may consider starting with IIS logs, event logs... maybe set up a default DebugDiag Crash Rule on the target process. You're not looking for a crash, but DD will keep a log of your target exe that includes things like exceptions thrown. When the problem repros, look at this log to see if you see a signature that precludes the issue.Ultimately, ETW & PerfView may be what helps the most.

@JorgeF:Great minds think alike? One of the sessions I'm preparing for next time is directly related to proper load testing for ASP.NET. One of the other sessions, if I can complete it in time, may involve some live debugging. Because this series focuses on the production environment, and you'd never ideally want to do a live debug in prod, I don't plan to cover too much of this (unless, of course, folks keep asking for it).