Learnt something yesterday I never knew.  This is from my good friend Andy Maggs a co-worker at Ridgian. Despite the great tools in Visual Studio these days for working with SharePoint there are still occasions when you need to manually connect to the w3wp.exe processes which run in IIS in order to debug.  The trouble is – which one do you connect to?  There are often 5 or 6 running.  Normally I just connected to them all and to hell with it, but Andy showed me a neat trick.

Open up IIS manager and select the root node, in the icons in the centre panel, you’ll see “Worker Processes”.    Click on there and wait a few seconds for it to refresh. Low and behold you’ll see the Application Pools against the process IDs.  Now when you go to attach to a process in Visual Studio, you’ll know which one(s) to connect to.

[Update : Obviously if you do an IISRESET or Recycle App Pool or deploy a Farm Feature, you will need to re-find the Process number!]

 

Nice one Andy.

Cheers

Dave Mc

2 responses

  1. Another way which might be quicker (I have it in a .bat file) is to run the following from the command prompt;

    %windir%\system32\inetsrv\appcmd.exe list wp

    Hope that’s useful 🙂

    1. It is indeed Brian! Thanks again

Leave a reply to Brian Scott Cancel reply

The Blog

Dave Mc muses about history, travel, writing, coaching, astronomy, technology and life, family and the world around us. You may agree with his opinions, you may not, that’s life …