ADPlus, Windows 7 and ASP.Net


I’ve been working through some crash dumps with ADPlus and WinDBG recently and hit a couple of snags that seem to be related to running ADPlus on Windows 7. John Robbins gives details of the first issue I hit and points out that the output from tlist.exe (which ADPlus uses) had changed. The post also notes that the issue is fixed in later releases of the Debugging Tools (version 6.11.1.402 and later), so I upgraded. With 6.11.1.404 installed, I started to get a different error:

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Attaching the debugger to: W3WP.EXE_-MyAppPool-_-v_-v2.0-_-l_-webengine4.dll-_-a_-.-pipe-iisipm1417f766-136f-4838-8332-861176da3119_-h_-C-inetpub-temp-apppools-MyAppPool.config-_-w_--_-m_0_-t_20
                               (Process ID: 3412)
Error creating file: C:\Program Files\Debugging Tools for Windows (x64)\Hang_Mode__Date_07-22-2009__Time_15-32-0505\CDBScripts\PID-3412__W3WP.EXE_-MyAppPool-_-v_-v2.0-_-l_-webengine4.dll-_-a_-.-pipe-iisipm1417f766-136f-4838-8332-861176da3119_-h_-C-inetpub-temp-apppools-MyAppPool.config-_-w_--_-m_0_-t_20.cfg Error: 76 -
Path not found

On a successful run, I’d expect to see

Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.

Attaching the debugger to: W3WP.EXE_MyAppPool
                               (Process ID: 3412)

The key difference is the text after “Attaching the debugger to:”. Looking through the adplus script, the name used there is built up from the process name and the application pool name. In order to get the name of the application pool, adplus uses the command line from the tlist output.

On my machine (and also on a colleague’s Windows 7 machine) the command line for w3wp.exe is along the lines of

c:\windows\system32\inetsrv\w3wp.exe -ap "MyAppPool" -v "v2.0" -l "webengine4.dll" -a \\.\pipe\iisipm1417f766-136f-4838-8332-861176da3119 -h"C:\inetpub\temp\apppools\MyAppPool.config" -w "" -m 0 -t 20

On a Windows Server 2008 box that I had access to the command line is similar, but the big difference is that the –ap parameter (which specifies the application pool name) appears at the end of the command line. Looking back at the adplus script, it seems to assume that the –ap parameter will be at the end. I made a small change to my adplus script to only pull back the quoted value (with no regard for how to handle embedded quotes). The point to make the change is after the following code

if g_CurrentProcesses(PCount).Name = "W3WP.EXE" Then
    ' read the next line
    if not objTextFile.AtEndofStream Then
        strAux = objTextFile.ReadLine
        ' check the command line for the -ap parameter
        If InStr(strAux, "-ap") Then
            arrAux = split(strAux, "-ap", -1, 1)
            strPackageName = trim(arrAux(1))

All that is needed is to add the following code immediately after the last line above (NOTE: as always, use this entirely at your own risk!!!)

' modifications start (http://blogs.msdn.com/stuartleeks/archive/2009/07/22/adplus-windows-7-and-asp-net.aspx)
If Mid(strPackageName, 1, 1) = """" Then
    strPackagename = Mid(strPackageName, 2, InStr(2,strPackageName, """") - 2)
End If
' modifications end

With this change in place, I’m back in business with adplus! As mentioned, I got this behaviour on my Windows 7 machine using version 6.11.1.404 of the Debugging Tools for Windows. I make no claims that the change above will work for you, or even that it won’t delete all your files ;-). Hopefully this will be addressed in a future release of the Debugging Tools…

Comments (5)

  1. junger says:

    This fix also works for Windows 2008 R2.  Thanks!

  2. Wade Mascia says:

    Hi Stuart – Just curious why you prefer to use adplus instead of DebugDiag in these scenarios.  Please let us know if there's something we should address.  Note that we recently added support for win2k8 x64 and win2k8 R2 (blogs.msdn.com/…/debug-diag-1-2-beta.aspx).

  3. Wade Mascia says:

    Hi Stuart – Just curious why you prefer to use adplus instead of DebugDiag in these scenarios.  Please let us know if there's something we should address.  Note that we recently added support for win2k8 x64 and win2k8 R2 (blogs.msdn.com/…/debug-diag-1-2-beta.aspx).

    wade.m  at microsoft.com

Skip to main content