2014-09-26

About Worker Process:-Worker process (w3wp.exe) runs the ASP.NET application in IIS. This process is responsible to manage all the request and response that are coming from the client system. All the ASP.NET functionality runs under the scope of worker process. When request comes to the server from a client worker process is responsible to generate the request and response.

While working on SharePoint object model we usually, attach w3wp.exe to debug the solution.
But having no idea, which w3wp.exe is running which sharepoint site.So usually, we attach all w3wp.exe, which is not a good practice.
There are various ways to find right worker process. 

1- Using IIS :- Open IIS (Type Inetmgr on run) – and Form Right pane, double click on Worker Process button available under IIS Header and you will found the exact w3wp.

2- Using PowerShell (My Favorite) Just open any Powershell script editor/shell editor and type following command:

<Root>:\Windows\System32\inetsrv\appcmd.exe LIST wp | Out-GridView

In my case Root is C: so command will be

C:\Windows\System32\inetsrv\appcmd.exe LIST wp | Out-GridView

3- Using Visual Studio (Adding Linl in external tool)

For this, Please follow the Link 

Note– Please note, after deployment/Updation of wsp, first refresh the browser and then run this tool,PowerShell cmdLet or check from IIS otherwise you will get old thread and will not work for you.

About the author 

Ajeet Kumar Singh