Skip to main content

Elumenotion Blog

Go Search

 
Elumenotion > Elumenotion Blog > Posts > Getting the w3wp.exe Process ID for Attach to Process
Getting the w3wp.exe Process ID for Attach to Process

This is pretty well known and lots of others have posted about it over the years, but for the sake of completeness for those who read the last post and don't know this already…

Often when you try to attach to the w3wp.exe process and debug an assembly there are multiple instances from which to choose. How do you know which one to pick?

Open a command prompt and run the iisapp.vbs script with no parameters as follows:

It will output a list of the currently running application pools and the associated PIDs.

Author: Doug Ware

Comments

iisapp

With Windows Server 2003, when I run iisapp in the run box from the C prompt, The resulting message says iisapp is not found. When I run iisapp in the cmd window, the message says "the script does not work with WScript." I have tried running iisapp on three diferent Windows Server 2003 servers with the same results. The example doesn't show any pathing other than C:
MikeF at 11/19/2008 4:23 PM

RE:MikeF

Good point. Use cscript.exe.

Run cscript //h:cscript to make cscript the default script interpreter.
Doug Ware at 11/21/2008 9:12 AM

iisapp not recognized

Hi,
i tried running iisapp from windows command as well as visual studio 2005 command prompts, it gives me an error saying
"iisapp is not recognized as an internal or external command, operable program or batch file"
how can i run iisapp now, any other way or path.
Note: I even tried running "Run cscript //h:cscript ".Thanks
Abrar at 4/9/2009 9:23 AM

For IIS 7 use this command

%windir%\system32\inetsrv\appcmd.exe list wp
Peeyush at 12/8/2009 11:35 PM

thanks bro

made the life easier
Ahmed Ali at 1/5/2010 2:34 AM

Re: Getting the w3wp.exe Process ID for Attach to Process

Whats  the registry change that is required for displaying this?
Soumo at 4/11/2011 5:22 PM

Re: Getting the w3wp.exe Process ID for Attach to Process

Gr8 Post bro!!
Siva Narayanan at 7/28/2011 2:54 PM

Good one

Thanks for your post.

i have used %windir%\system32\inetsrv\appcmd.exe list wp to view all the WP.
Aditya Reddy at 12/2/2011 7:00 AM

c:\windows\system32\inetsrv\appcmd list wp

c:\windows\system32\inetsrv\appcmd list wp
This will work for sure.
Priyabrata at 8/27/2012 10:47 AM

Add Comment

Items on this list require content approval. Your submission will not appear in public views until approved by someone with proper rights. More information on content approval.

Title


Body *


Your Name *


Attachments
Follow me on twitter!
The Atlanta .NET User Group
MVP Logo
  Archive
  Archive (Calendar)
  Skinner Created Themes
  New Skinner Download
  New Skinner Tutorial

©  2009 Elumenotion, LLC  |   SharePoint Training, SharePoint Consulting and SharePoint Staffing
8075 Cavendish Place | Suwanee, Georgia 30024 | + 1 (888) 653-5021