Pages

Sunday 24 March 2013

How to find the w3wp ProcessId when attaching to process from Visual Studio


When debugging from Visual Studio, you have to attach to the correct w2wp process.

To find the right w3wp process on a windows server 2008 R2 running IIS 7.5, run the following command:

  1. Open command prompt (right click run as administrator)
  2. if not already at c:\windows\system32. navigate to the location by this command cd   c:\windows\system32\inetsrv
  3. use this command to get a list of all the w3wp process
    appcmd list wp
  4. Identify the correct process from the list

That's is, now you can attach to the correct process rather than attaching to all :)

No comments:

Post a Comment