You may receive an "unable to attach to the process" error message when you try to debug a remote script process (833894)
The information in this article applies to:
- Microsoft Visual Studio 2005 Professional Edition
- Microsoft Visual Studio 2005 Standard Edition
- Microsoft Visual Studio .NET (2003), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2003), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2003), Academic Edition
- Microsoft Visual Studio .NET (2002), Professional Edition
- Microsoft Visual Studio .NET (2002), Enterprise Architect Edition
- Microsoft Visual Studio .NET (2002), Enterprise Developer Edition
- Microsoft Visual Studio .NET (2002), Academic Edition
SYMPTOMSIn Microsoft Visual Studio .NET or in Microsoft Visual Studio 2005, when you try to debug a remote script
by attaching to the host DllHost.exe process that runs on a remote computer
that is a member of the same domain, you may receive the following error
message: Unable to attach to the process. The
process does not have sufficient privileges to be
debugged. CAUSEYou notice this behavior if the DllHost.exe process runs
under a user account that does not have sufficient rights to debug the remote
script. The DllHost.exe process does not have sufficient rights if both the
following conditions are true:
- The virtual directory that contains the remote script that
you are trying to debug uses medium application protection or high application
protection.
- The DllHost.exe process does not run under a local
administrator account or under a domain account.
Note Typically, the DllHost.exe process runs under the
IWAM_ComputerName user account. ComputerName is a placeholder for the name of the
computer.
Microsoft has designed remote script debugging so that your computer has a higher level of protection. WORKAROUNDTo work around this behavior, use either one of the following
methods. Note The following workarounds grant a high level of rights to
some processes that run on your computer. These workarounds may also lower
the level of protection for your computer. Therefore, Microsoft recommends that
you use these workarounds only while you are debugging the remote script. When you
have finished debugging the remote script, Microsoft recommends that you restore your
computer to its original configuration. Run the DllHost.exe process under a local administrator account or under a domain account- On the remote computer:
- On Microsoft Windows Server 2003
Click Start, point to Administrative
Tools, and then click Component Services. - On Microsoft Windows 2000
Click
Start, point to Programs, point to
Administrative Tools, and then click Component
Services.
- In the left pane of the Component Services
dialog box, expand Component Services, expand
Computers, expand My Computer, and then
expand COM+ Applications.
- Right-click IIS Out-Of-Process Pooled
Applications, and then click Properties. The
IIS Out-Of-Process Pooled Applications Properties dialog box
appears.
- Click the Identity tab. In the This
user section, click Browse.
- On Windows Server 2003
The Select User dialog box appears. - On Windows 2000
The Select User or Group dialog box
appears.
- Do the following:
- On Windows Server 2003
In the Enter
the object name to select box, type the name of a local administrator
account or the name of a domain account, and then click OK to
close the Select User or Group dialog box. - On Windows 2000
Select a local administrator account or a domain account, and
then click OK to close the Select User or
Group dialog box.
- In the IIS
Out-Of-Process Pooled Applications Properties dialog box, do the following:
- In the Password box, type the
password of the user account that you selected in step 5.
- In the Confirm password box,
type the password of the user account that you selected in steps 5.
- Click
OK.
Note If you receive a warning message, click
Yes.
- Start a command prompt.
- At the command prompt, run the following command to reset
Microsoft Internet Information Services
(IIS):
- In Microsoft Internet Explorer, run the script that you
want to debug.
- Attach to the host DllHost.exe process:
- On your local computer, start Visual Studio
.NET or Visual Studio 2005.
- On the Tools menu, click Debug
Processes. The Processes dialog box
appears.
- Click the ellipsis button (...) next to the Name box.
The Browse for Computer dialog box appears.
- In the Select machine box, locate and then
select the remote computer, and then click OK.
- In the Processes dialog box, make sure
that the Show system processes check box and the Show
processes in all sessions check box are selected.
- In the Available Processes box, click the
DllHost.exe process that has Microsoft Active Server
Pages as a part of the Title field.
- Click Attach. The Attach to
Process dialog box appears.
- In the Choose the program types that you want to
debug box, make sure that the Script box is selected,
and then click OK. You can now debug the remote
script.
- To restore your computer to its original configuration
after you finish debugging the remote script, follow these steps:
- Use the Adsutil.vbs script file to obtain the password
for the IWAM_ComputerName user account on the remote
computer.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
297989
PRB: Configured identity is incorrect for IWAM account
- Perform steps 1 through 4.
- Do the following:
- On Windows Server 2003
In the Select User dialog box, type
IWAM_ComputerName in the
Enter the object name to select box, and then
click OK. - On Windows 2000
In the Select User or Group dialog
box, click
IWAM_ComputerName, and then click
OK.
- In the IIS
Out-Of-Process Pooled Applications Properties dialog box, do the following:
- In the Password box, type the
password that you obtained in step a.
- In the Confirm password box,
type the password that you obtained in step a.
- Click
OK.
Note If you receive a warning message, click
Yes.
- Perform steps 7 through 8.
Use low application protection for the virtual directory that contains the script that you want to debugIf you use low application protection for the virtual directory
that contains the script that you want to debug, the script runs in the context
of the Inetinfo.exe process. The Inetinfo.exe process runs under the SYSTEM
user account. Therefore, you can debug the remote script. To use this workaround, follow these steps:
- On the remote computer:
- On Windows Server 2003
Click Start, point to Administrative
Tools, and then click Internet Information Services (IIS)
Manager. The Internet Information Services (IIS)
Manager dialog box appears. - On Windows 2000
Click Start, point to Programs,
point to Administrative Tools, and then click Internet
Services Manager. The Internet Services Manager
dialog box appears.
- Do the following:
- On Windows Server 2003
In the left pane of
the Internet Information Services (IIS) Manager dialog box,
locate and then right-click the virtual directory that contains the script that
you want to debug. - On Windows 2000
In the left pane of the
Internet Services Manager dialog box, locate and then
right-click the virtual directory that contains the script that you want to
debug.
- Click Properties.
- In the Application protection box of the
Application settings section, select Low (IIS
Process), and then click OK.
- In Internet Explorer, run the script that you want to
debug.
- Attach to the host DllHost.exe process:
- On your local computer, start Visual Studio
.NET or Visual Studio 2005.
- On the Tools menu, click Debug
Processes. The Processes dialog box
appears.
- Click the ellipsis button (...) next to the Name box.
The Browse for Computer dialog box appears.
- In the Select machine box, locate and then
select the remote computer, and then click OK.
- In the Processes dialog box, make sure
that the Show system processes check box and the Show
processes in all sessions check box are selected.
- In the Process field of the
Available Processes box, click
inetinfo.exe.
- Click Attach. The Attach to
Process dialog box appears.
- In the Choose the program types that you want to
debug box, make sure that the Script box is selected,
and then click OK. You can now debug the remote
script.
- To restore your computer to its original configuration
after you have finished debugging the remote script, follow these steps:
- Perform steps 1 through 3.
- In the Application protection box of
the Application settings section, select Medium
(Pooled), and then click OK.
STATUS This
behavior is by design.REFERENCESFor more information, visit the following Microsoft
Developer Network (MSDN) Web sites:
Modification Type: | Major | Last Reviewed: | 2/10/2006 |
---|
Keywords: | kbvs2005swept kbvs2005applies kbScript kbDebug kberrmsg kbprb KB833894 kbAudDeveloper |
---|
|