You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$10
For Premium members:
Here, we will look into troubleshooting crashes of web sites hosted on IIS 7 and IIS 7.5.
The previous article, explained High CPU utilization issues and how to collect & analyze memory dumps using DebugDiag. Here, we will look into troubleshooting crashes of web sites hosted on IIS 7 and IIS 7.5. Sometimes, our ASP.NET application might not respond to our requests and shows the "This page can't be displayed" error. This might happen when w3wp.exe hosting your website crashes. W3wp.exe crashes in scenarios like unhandled exceptions, memory overflow, heap corruption and so on. We need to find the root cause for this issue. We can troubleshoot this type of issue by collecting a memory dump of the w3wp.exe at the time of crash and analyze it further in WinDbg. Let's download DebugDiag 1.2 [Available here] based on server bit ness [32 or 64 bit].Let's create a sample MVC application that will throw a stack overflow exception [second chance exception]:public class HomeController : Controller{ public ActionResult Index() {
MethodA();
return View(); }
private static void MethodA()
{
MethodA(); }
}Now publish this app on IIS using the following procedure:
When we browse to the application [http://localhost/MvcApplication4], w3wp.exe crashes after sometime and that will be logged in the Windows Application Log as shown below:Let's open DebugDiag and configure a rule to collect a full user memory dump for the crash of w3wp.exe as shown below:Click Next:Click Next and type w3wp.exe or select the specific App Pool or select w3wp.exe, if it is already running:Click Next & Finish.Run the application, this will throw an unhandled exception and DebugDiag will collect a full user dump having information about the threads, stack trace, exception, locks and so on. Let's analyze it using advanced analysis. This shows an exception occurred on thread 22 and stack trace shows recursion.This analysis report provides the following details:
Let's analyze it further in WindDbg. Download WinDbg [Available here], drag & drop the memory dump and use the following commands:
Let's dig into DebugDiag customization:
Let's complete the explanation by having an overview:
I will end here with the previous explanation and in future articles explain troubleshooting other issues like hang, high memory and so on.
Pro WPF: Windows Presentation Foundation in .NET 3.0