If you have multiple pools running within IIS locally, you’ll see corresponding w3wp.exe processes in visual studio when you try to attach for debugging purposes. One quick way to figure out *which* one is the w3wp that you need to attach to is to display the process id and application pool for all the w3wp processes on your machine. There’s plenty of old-school way to do that, or you can use a powershell script such as this:
gwmi win32_process -filter “name=’w3wp.exe'” | format-table -autosize name,processId,commandLine
So, you could pop that into a powershell file and call that either via an old-school batch file – or….. you could use a command line utility such as SlickRun and in-line the command into a “MagicWord” (Slickrun-speak for a named command) like this:
magic.
Of course, this is pretty simple too: http://www.ervinter.com/2009/04/23/get-process-id-from-multiple-application-pool-iisapp/
