Post Pic

Discover which ASP.Net Worker Process Belongs to each AppPool

Ever needed to know which ASP.Net worker process (w3wp.exe)  belongs to an App Pool? Well I did recently when I needed to attach to it for debugging and there was no obvious way to find out which process related to each app pool. A little bit of research led me to discover AppCmd.exe. I wrote a small batch file which will list them all for you and include the process id. Simply copy the following into a blank text file and save with a .bat extension and you can run it whenever you need to, alternatively just run the command through a standard command prompt.

cd %systemroot%system32inetsrv
appcmd list wps
pause

You should end up with a line like the following for each worker process on your machine:

WP "5528" (applicationPool:DefaultAppPool)

Umbraco Certified Developer
SagePay Approved Partner
Creative Market