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 121y2420b the values of three metabase properties. The values of these metabase properties, which are set by running a script, must specified as follows:
u·
Set the OrphanWorkerProcess
metabase property to TRUE to notify the WWW service to orphan the worker
process when it fails.
u·
Set the OrphanActionExe
metabase property to specify an executable to run when the worker process is
orphaned.
u·
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:
u·
Debugging requires that you set all
three metabase properties outlined above; enabling debugging is ineffective
until you attach a debugger.
u·
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.
u·
Credentials:
Membership in the Administrators group on the local computer.
u·
Tools:
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
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:
appPoolObj.SetInfo
WScript.Echo "After: " & appPoolObj.OrphanWorkerProcess & ", " & appPoolObj.OrphanActionExe & ", " & OrphanActionParams
Save the file with the extension .vbs.
In the Run dialog box, type cmd, and then click OK.
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.
|