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%\system32\inetsrv
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)

Related Posts

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

2 Responses

[...] This post was mentioned on Twitter by Bijesh, Simon Dingley. Simon Dingley said: New blog post: Discover which ASP.Net Worker Process Belongs to each AppPool http://bit.ly/dCyPWz [...]

07.23.10

I find it’s just easier to run each app pool as a different user, also makes security easier to manage ;)

Leave Your Response

* Name, Email, Comment are Required
SagePay Approved Partner
Microsoft WebsiteSpark

My Productivity