Finding the correct w3wp.exe when debugging
When using the Visual Studio Debug +Processes menu command to attach to a web site to debug you may be presented with several w3wp.exe processes under II6 with Windows Server 2003. There is one for each application pool running under IIS. Here’s how to find out which one is running your application:
- Run a command prompt and navigate to the Windows system32 folder
- Issue the following command:
The output from this script will be something like:
Microsoft (R) Windows Script Host Version 5.6
Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
W3WP.exe PID: 4044 AppPoolId: MSSharePointPortalAppPool
The process id is 4044 for, in this case, SharePoint Portal Server.