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: ASP.Net, Debugging, IIS, WorkerProcess
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








Can you help me how to identify Worker Process in IIS 5.1
for IIS 5.1 process name is aspnet_wp.exe.
Good one buddy….
Thanks !!
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…
excellent dude!!
Thanks Ram !!
Nice one dude. I always love reading your articles. Keep it up and make me always busy learning about ASP.Net…
Cheers,
Kunal
Thanks Kunal !! Nice to know you liked it !!
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
Hi,
Could you please provide some more details on the error? what is the exact error and when you are getting that?
Thanks !
Abhijit
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——————-
Rest of the code
———–Default.aspx——————-
”
“
Sorry but can’t post the Html – but can mail it to you if needed
Abijit articles from you are always best. Just keep doing greart work.
Thanks
Raj
Thanks man !!!
[...] 6. Identifying Worker Process (w3wp.exe) – IIS 6.0 and IIS 7.0 for Debugging ASP.NET Application [...]
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
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
[...] 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 [...]
[...] Identifying Worker Process (w3wp.exe) – IIS 6.0 and IIS 7.0 for Debugging ASP.NET Application July 2010 20 comments 3 [...]
Thanks a lot
its very useful to learn for us like a freshers..
[...] 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 [...]
[...] 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 [...]
For IIS7 you can just use the GUI. IIS manager–>Server–>Worker Processes there is no need to enter the command line.
Thanks.
I have talked about the same over here,
http://abhijitjana.net/2010/11/04/how-to-use-iis-manager-to-get-worker-processes-w3wp-exe-details-information/
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
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
[...] more details on “Identifying worker processes II6 & IIS 7 for debugging and look at Remote [...]
[...] 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 [...]
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
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.
[...] This post is directly from Abhijit Jana’s blog [...]
Hi Abhijit,
Can you tell me what is worker process????????????
Hi Abhijit,
i am just beginner with iis and i am following you and ……..your articals helping me very well.
Thanks:-
Mohit Bansla
run this command ‘appcmd list wp’ in elevated command prompt
Good job abhi .. super like!