Home > Microsoft SharePoint, Microsoft SharePoint 2010 > Identify the worker process (w3wp) associated with my application only

Identify the worker process (w3wp) associated with my application only

Hi Friends,

I am here again to discuss a small problem which you may or may not faced previously, related to the worker process and SharePoint debugging.

While developing the custom SharePoint artefacts like custom web parts, event receivers, application pages etc. We need to debug to check what is going wrong with the code written by us.

What we normally do while attaching in IIS6 days was to use ‘iisapp.vbs’ file in System32 folder. But it is replaced with something other with IIS7.

Normally developers attach all the running worker process to debug the code. I said initially that you may or may not face this problem as if you are the only developer working on a server then you may not face this issue but if another developer is sharing a server with you for development and if he/she attaches all the running worker processes then you my wonder why your part of code is not working and looking like hanged stat. This may because some other developer attached all the w3wp’s running.

So what’s the solution to identify and attach to only specific worker process running for my application?

  1. Go to Run  ==> cmd ==> enter or if you are not administrator then run command prompt as administrator.
  2. Write following command
    cd Windows\System32\Inetsrv ==> enter
  3. Now run following command to get the list of worker processes associated with the app
    appcmd.exe list wp ==> enter

You will get the result as shown in bellow screen shot.

Form this you will get the worker process ID in double quotes, example WP with ID “4996” is associated with SharePoint central administration application. So you can choose that worker process with the same ID against your application in visual studio while debugging.

Happy Coding….

Advertisements
  1. March 5, 2012 at 11:20 am

    Hi Prasad,
    Thanks for sharing.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: