Hosam Kamel's Blog

Sponsors

News


Follow HosamKamel on Twitter

Blogroll

How to identify your application worker process (w3wp)

When working with multiple application pools it’s being difficult while debugging your asp.net web application to identify the worker process (w3wp.exe) you want to attach your debugger to.

Attach to process

To identify your application worker process (w3wp), You have to get the correct worker process ID to do so:

For Window 2008 or Vista (IIS 7.0)

  • IIS 7.0 shipped with a new utility called AppCmd which serve as a command line server management utility.
  • This tool located in %systemroot%\system32\inetsrv\AppCmd.exe
  • To list current worker process Id’s along with its corresponding site use the below command 
    AppCmd.exe list wps
  • image 
  • once you got your application worker process Id, you select the correct worker process from “Attach to Process” dialog on Visual Studio.

For Window 2003 (IIS 6.0)

  • Use iisapp.vbs script, a command line tool included in IIS 6.0 is used to list worker processes
  • This script located in %SystemRoot%\System32\IIsApp.vbs
  • Run it by typing
    cscript IIsApp.vbs
  • image
  • once you got your application worker process Id, you select the correct worker process from “Attach to Process” dialog on Visual Studio.

Hope it helps.



Comments

Ayman El-Hattab said:

Go Hossam Go!!

# October 18, 2009 1:19 AM

Twitter Trackbacks for How to identify your application worker process (w3wp) - Hosam Kamel [asp.net] on Topsy.com said:

Pingback from  Twitter Trackbacks for                 How to identify your application worker process (w3wp) - Hosam Kamel         [asp.net]        on Topsy.com

# October 18, 2009 11:43 AM

sandra mcleod said:

Thanks for the post!  I was looking for just exactly this information!!

# July 23, 2010 10:13 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)