jump to navigation

Identifying Worker Process (w3wp.exe) – IIS 6.0 and IIS 7.0 for Debugging ASP.NET Application July 15, 2010

Posted by Abhijit Jana in ASP.NET, IIS.
Tags: , , ,
trackback

If you are debugging a ASP.NET web application which is hosted on IIS, you need to attach the particular worker process in Visual Studio to start debugging. To Attach a process we can go to Tools > Attach Process or use shortcut key Ctrl +P. The process window will show the worker process (w3wp.exe) which is currently running on IIS. You need to select the process and click on attach button to start the debugging.
Problem starts when you have multiple worker process running on IIS.  If you have multiple sites hosted on IIS and each site having their own application pool then you will see the list of all worker process in the Process Attach window.


Here  you need to identify the particular worker process which is associated with your application pool.

Note: Whenever we create a new Application Pool, the ID of the Application Pool is being generated and it’s registered with the HTTP.SYS (Kernel Level of IIS) . So whenever HTTP.SYS Received the request from any web application,  it checks for the Application Pool and based on the application pool it send the request

To know more about IIS Request Process, here is one of my aticle How IIS Process ASP.NET Request

Identify Worker Process in IIS 6.0

• Start > Run > Cmd
• Go To Windows > System32
• Run cscript iisapp.vbs
• You will get the list of Running Worker ProcessID and the Application Pool Name.


So, here is your list of all worker process with corresponding application pool name.  From  the Application pool name you can easily identify which worker process is related with your application.

Identify Worker Process in IIS 7.0


From IIS 7.0 you need you to run IIS Command Tool ( appcmd ) .
• Start > Run > Cmd
• Go To Windows > System32 > Inetsrv
• Run appcmd list wp

This will show you list worker process that is running on IIS 7.0 in the similar format of IIS 6.0

List of IIS Article Published by Me

Beginner’s Guide : Exploring IIS 6.0 With ASP.NET
Debug Your ASP.NET Application that Hosted on IIS : Process Attach and Identify which process to attach
Remote IIS Debugging : Debug your ASP.NET Application which is hosted on “Remote IIS Server”
How IIS Process ASP.NET Request

 
Shout it

Comments»

1. suresh - November 30, 1999

Can you help me how to identify Worker Process in IIS 5.1

Abhijit Jana - August 22, 2011

for IIS 5.1 process name is aspnet_wp.exe.

2. Abhishek Sur - July 15, 2010

Good one buddy…. :)

3. Abhijit Jana - July 15, 2010

Thanks !!

4. DotNetShoutout - July 15, 2010

Identifying Worker Process (w3wp.exe) – IIS 6.0 and IIS 7.0 for Debugging ASP.NET Application « Abhijit’s World of .NET…

Thank you for submitting this cool story – Trackback from DotNetShoutout…

5. Ram Sharma - July 15, 2010

excellent dude!!

Abhijit Jana - July 15, 2010

Thanks Ram !!

6. Kunal Chowdhury - July 15, 2010

Nice one dude. I always love reading your articles. Keep it up and make me always busy learning about ASP.Net… :)

Cheers,
Kunal

Abhijit Jana - July 15, 2010

Thanks Kunal !! Nice to know you liked it !!

7. Lars - July 27, 2010

Hi Very good article, solved my problem with sharepoint foundation 2010 – could not use the sharepoint lib from VS, without getting then error “file not found…?”.

thanks
Lars

Abhijit Jana - July 27, 2010

Hi,
Could you please provide some more details on the error? what is the exact error and when you are getting that?
Thanks !
Abhijit

8. Lars - July 27, 2010

Hi Abhijit

Here is my problem :

I have made a .net asp project using sharepoint.dll (sharepoint foundation 2010)
but then i run the code i get “filenotfound”, if i write the url in my browser i have no problem with acessing the site.
I only get the problem then i call spsite from a asp.net app, and run it from visualstudio, if i deploy it to my IIS it works fine?.

and i can also make a winform app and run if from visualstudio calling the same code with no problem, so it’s only
then i’m running the asp.net project from VS i get the problem.

br.
Lars

i’m using windows7 64bit, visual studio 2010. and sharepoint foundation. and IIS 7

my code:

default.aspx.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.SharePoint;

public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
SPSite _MySite = new SPSite(“http://lpddell/”);
SPWeb _MyWeb = _MySite.OpenWeb();
}
}
———–Default.aspx——————-

9. Lars - July 27, 2010

Rest of the code

———–Default.aspx——————-

10. Lars - July 27, 2010
11. Lars - July 27, 2010

12. Lars - July 27, 2010

Sorry but can’t post the Html – but can mail it to you if needed

13. Raj thakur - August 11, 2010

Abijit articles from you are always best. Just keep doing greart work.

Thanks
Raj

Abhijit Jana - August 11, 2010

Thanks man !!!

14. IIS Articles Archives « Abhijit's World of .NET - September 1, 2010

[...] 6. Identifying Worker Process (w3wp.exe) – IIS 6.0 and IIS 7.0 for Debugging ASP.NET Application [...]

15. angler - September 3, 2010

Hi,

Really nice article! And I appreciate that you covered both IIS 6 and 7.

If you want, take a look at a VS 2010 Extension I have written: WADA.

What it does: It finds the running W3WP processes and their application pools + allows to directly attach to that process for debugging purposes.

You can find a description on my blog:

http://angler.wordpress.com

Abhijit Jana - September 3, 2010

Hi Martin,
Great to know you liked it. Reagarding the extension, I have had started to developing the same few months back after posting this blog post. This is quite difficult when we are having multiple app pool running over IIS and need to attached a particular porcess. My plan was to enable some features when i can show the particular worker process that is related to that web site. I am also most done with the work. I am now just looking for which is the best place to put my extension in visual studio. I hope to share it very soon.
Cheers
Abhijit

16. How to Use IIS Manager to get Worker Processes (w3wp.exe) details Information « Abhijit's World of .NET - November 4, 2010

[...] Information Services, Tips and Tricks, WorkerProcess trackback In one of my previous blog post, Identifying Worker Process (w3wp.exe) – IIS 6.0 and IIS 7.0 for Debugging ASP.NET Application  -  I have explained about how we can identify the list of currently running worker process  [...]

17. My Blog 2010 in review by WordPress.Com « Abhijit's World of .NET - January 2, 2011

[...] Identifying Worker Process (w3wp.exe) – IIS 6.0 and IIS 7.0 for Debugging ASP.NET Application July 2010 20 comments 3 [...]

18. Suresh T.G - February 9, 2011

Thanks a lot

19. manoj - February 20, 2011

its very useful to learn for us like a freshers..

20. Feed Digest–Fev/March 2011 - Chaves - March 15, 2011

[...] Identifying Worker Process – IIS 6 and 7 -  for those who develop websites this is a awesome tip in order to help on site debug if you are on a remote environment [...]

21. Feed Digest–Fev/March 2011 - Chaves - XAML PT - March 15, 2011

[...] Identifying Worker Process – IIS 6 and 7 -  for those who develop websites this is a awesome tip in order to help on site debug if you are on a remote environment [...]

22. Rovastar - March 30, 2011

For IIS7 you can just use the GUI. IIS manager–>Server–>Worker Processes there is no need to enter the command line.

Abhijit Jana - March 31, 2011
23. shweta - April 12, 2011

hey abhijit ..nice articles…m new to .net n windows azure…i hav a problem cited below hope u can help me wid this.

After i create a cloud project and add a asp.net web role, i run the project and i get a blank page in the browser. I then changed the http web activation thing in d windows features on or off place…still i hav been facing this problem since two days…hope u can help me out :)

24. Tofan Nayak - May 3, 2011

I always reading your articles.
also i am getting so many knowledge in your tip and trick.
You are genius and exalant .
I am from Orissa(Bhubaneshow)

Thanks & Regards
Tofan Nayak

25. Troubleshooting IIS and SharePoint When a Worker Process Goes Haywire « Sharepoint Gadget - July 15, 2011

[...] more details on “Identifying worker processes II6 & IIS 7 for debugging and look at Remote [...]

26. No able to view all the running Worker Process in Visual Studio – Process Attach Window – Resolution « Abhijit's World of .NET - August 18, 2011

[...] my answer here as well  http://bit.ly/nehkhH Here is one of my old post where I talked about Identifying Worker Process (w3wp.exe) – IIS 6.0 and IIS 7.0 for Debugging ASP.NET Application . This will help you to identify a particular worker process when multiple is running. If you are [...]

27. suresh - August 22, 2011

Mostly i can get details around Worker Process but what exactly it is am unable to get it. If you let me know it would be very helpful

28. Won Lee - August 25, 2011

Thanks for sharing your info on this.

Wouldn’t it be even better if IIS can assign a title to each worker process? It could take names from application pools.

29. Indentify Worker Process | Turtle Works LLC - January 17, 2012

[...] This post is directly from  Abhijit Jana’s blog [...]

30. Shivani - June 15, 2012

Hi Abhijit,
Can you tell me what is worker process????????????

31. Mohit Bansla - September 3, 2012

Hi Abhijit,

i am just beginner with iis and i am following you and ……..your articals helping me very well.

Thanks:-

Mohit Bansla

32. Srihari - December 14, 2012

run this command ‘appcmd list wp’ in elevated command prompt

33. Kapil - January 4, 2013

Good job abhi .. super like!


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 )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 1,667 other followers

%d bloggers like this: