If you have an IIS 6 with multiple application pools running, and you need to know which w3wp.exe process is actually hosting your application (suppose you have to capture a dump and don’t want to use the “-iis” switch with adplus, which will produce one dump file for every w3wp.exe, dllhost.exe and for inetinfo.exe), then follow these steps to find out:
- Using the IIS Manager, note down the Name of the App pool for your application
- In the command prompt, go to <WindowsFolder>System32
- Type the following command: iisapp.vbs /a <AppPoolName> (Use double quotes around the name if it has a space)
- The result will contain the Process ID for your application pool
The greatest mistake you can make is to be continually fearing you will make one. – Elbert Hubbard