Locating the Process ID for the CRM Web Site

If you have ever had to connect to IIS to perform remote debugging you have probably encountered an situation where you have more than one IIS worker process running.

This worker process, w3wp.exe, is responsible for running the IIS web site and depending upon the number of web sites that you may have on a particular server, you may find more than one instance running.

This creates a problem when you are attempting to attach to IIS to debug your code ( like a plugin ).  If you have multiple w3wp.exe’s running which one do you pick?

After some digging around I found the answer this morning.

Note: This is assuming that you are running Windows Server 2008.

Perform these steps:

1) Open a command prompt.

2) Change your directory to the following:

C:\Windows\System32\inetsrv

3) Run the following command:

appcmd list wp

appcmd is the General purpose IIS command line administration tool

list is the command

wp is for worker processes

 

The output on one of my development servers looks like this:

WP "3648" (applicationPool:SharePoint Central Administration v4)
WP "5684" (applicationPool:CRMAppPool)

So, when I select Tools, Connect to Process from within Visual Studio, I would select the w3wp.exe with a Process ID (PID) of 5648.

Leave a Reply 0 comments