Home > Tips > Do you get confused identifying which w3wp.exe to attach to in Visual Studio?

Do you get confused identifying which w3wp.exe to attach to in Visual Studio?

Two options for you:

Option 1 (from command prompt)

– In IIS 6: run %windir%\system32\cscript iisapp.vbs

– In IIS 7: %windir%\system32\inetsrv\appcmd.exe list wp

This should give you process id with the corresponding application pool you’re interested in.

Option 2

  1. Open Windows Task Manager
  2. Add PID and Command Line to the Processes tab
  3. Find the w3wp.exe processes
  4. Look for your application pool under the Command Line tab.  Make a note of the PID
  5. The PID is the ID of the process you need to attach to in Visual Studio

I prefer option 1 as it explicitly displays your list of application pools and process IDs.

Hope this helps to solve the frustration we sometimes go through when you have so many application pools running in IIS.

Enjoy!

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: