Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

Debug Application Pool Failures

Updated: August 22, 2005

Applies To: Windows Server 2003, Windows Server 2003 with SP1

To enable orphaning of a worker process serving an application pool (which keeps failed applications running while your diagnostic tools monitor them), and to attach a debugger to the worker process, you must change the values of three metabase properties. The values of these metabase properties, which are set by running a script, must specified as follows:

  • Set the OrphanWorkerProcess metabase property to TRUE to notify the WWW service to orphan the worker process when it fails.

  • Set the OrphanActionExe metabase property to specify an executable to run when the worker process is orphaned.

  • Set the OrphanActionParams metabase property to configure command-line parameters for attaching the debugger to the worker process.

Consider the following guidelines when you enable debugging of application pool failures:

  • Debugging requires that you set all three metabase properties outlined above; enabling debugging is ineffective until you attach a debugger.

  • When you no longer want to use the debugging feature, disable it. Putting an application in orphan state wastes resources if the diagnostics are not running or will not be used.


  • Iis.msc.


As a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the Run as command to run IIS Manager as an administrator. At the command prompt, type runas /user:administrative_accountname mmc %systemroot%\system32\inetsrv\iis.msc.


To enable and configure debugging on a worker process
  1. Copy the following ADSI script (written in VBScript) into a text editor or word processor.

    set appPoolObj=GetObject("IIS://localhost/W3svc/AppPools/app pool name")
    ' Set the application pool properties:
    appPoolObj.Put "OrphanWorkerProcess", TRUE
    appPoolObj.Put "OrphanActionExe", "full path\ntsd.exe"
    appPoolObj.Put "OrphanActionParams", "-g -p %1%"
    ' Save the property changes in the metabase:
    WScript.Echo "After: " & appPoolObj.OrphanWorkerProcess & ", " & appPoolObj.OrphanActionExe & ", " & OrphanActionParams
  2. Save the file with the extension .vbs.

  3. In the Run dialog box, type cmd, and then click OK.

  4. At the command prompt, run the script by typing the following command:

    cscript //nologo filename

    where filename is the fully qualified path of the script file.

    – or –

    You can call the script by using a batch file that contains the following command:

    "cscript //nologo filename"

    where filename is the fully qualified path of the script file.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2015 Microsoft