Wednesday, January 7, 2009

What is the PID of my web application?

Update for Windows 2008: In IIS 7 this command is replaced by %windir%\system32\inetsrv\appcmd.exe list wp

Just a quick tip for developers. When you need to debug an assembly loaded by a web application (like SharePoint) you can attach the process to the project and debug. The problem is how to determine the correct process in the processes list if you have more than one web application. To select the correct process you can execute the IIS script iisapp. It will show you all the running web applications and the respective PID (Process Identifier).

This is my current output for 'iisapp':

W3WP.exe PID: 5120 AppPoolId: SharePoint
W3WP.exe PID: 5892 AppPoolId: SharePoint Central Administration v3
W3WP.exe PID: 360 AppPoolId: SharePoint - intranetalpha80
W3WP.exe PID: 5852 AppPoolId: SharePoint - DemoWeb80
W3WP.exe PID: 4604 AppPoolId: SharePoint - demowebPRO80
W3WP.exe PID: 5040 AppPoolId: SharePoint – 21503
W3WP.exe PID: 5416 AppPoolId: SharePoint – 11806
W3WP.exe PID: 2328 AppPoolId: SharePoint – 12345

Online Visitors