There are two ways to gather data in a Deadlock situation. If you are using Windows 2003 or later (IIS 6.0 or later), then follow the steps in the KB 828222
If you are using an older version of IIS, then follow the steps below:
A. Download DebugDiag: ======================
B. Create a Performance Monitor log: ====================================
For the ASP.NET counters, select the version that you are wanting to monitor. Ex. For 1.1 framework, select ASP.NET v1.1.4322 and ASP.NET Applications v1.1.4322.
Note: For more information on Performance monitor, see KB 248345
C. Running the 1.0 version of the framework?====================================
If you are running the 1.0 version of the framework you need to do the following before continuing:
D. Configure server to capture Deadlock ================================
Add the following registry key. This was added to the .NET Framework so that a breakpoint exception will be thrown when the deadlock occurs. This is documented in the following article:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET DWord: DebugOnDeadlock Value: 2 HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ASP.NET DWord: UnderDebugger Value: 0
E. Configure DebugDiag ===================
Configure DebugDiag to capture the memory dump when the BreakPoint Exception is thrown and when the process stops.
The memory dump will automatically get captured when the Deadlock occurs.
A. Stop the Performance Monitor log ===================================
In Performance Monitor: