Ever try to debug something on a machine with many w3wp.exe worker processes and weren’t sure which one was yours? There’s a command line you can use to tell which is which:
In IIS 6 (Windows XP/2003), type:
It is located in C:\Windows\System32, which is almost always part of the PATH variable, so you can run the command from anywhere (like iisreset).
In IIS 7/7.5 (Windows Vista/7/2008/2008R2):
appcmd list wp
It is in C:\Windows\System32\Inetsrv, which is not in the PATH variable by default, so you can switch to that folder first and run the command.
If you’re running multiple app pools on the server with the same proxy user account, now you can tell which one owns the application you’re trying to debug!