But, when i try to attach to the iisexpress.exe process, I get an error message - "Unable to attach to the process. The debugger was unable to automatically select an appropriate type of code. Please manually specify the type(s) of code to which the debugger
should attach."
This article describes how to configure your ASP.NET application for debugging, how to attach to the ASP.NET worker process (Aspnet_wp.exe) with the Microsoft CLR Debugger, and how to debug the application:
The way an ASP.NET request is handled by IIS is quite different in IIS 6.0 when compared with 5.0. In 5.0, the ASP.NET worker process is handed off control by the
aspnet_isapi extension in IIS. The aspnet_isapi dll runs in the inetinfo.exe process in IIS and functions what is known as the
CLR host (a CLR host is the piece of unmanaged code which is responsible for loading the CLR into the memory). So
aspnet_isapi “hands over” the processing to the worker process named aspnet_wp.exe, where the request passes through a series of HttpModules and an HttpHandler.
But in IIS 6.0, there is a driver named http.sys which listens to all the incoming requests (aspnet_isapi.dll is not in the picture at this point). The moment an ASP.NET specific request comes in, this driver starts an IIS 6.0 worker process (which
is not related to ASP.NET at all) named w3wp.exe. This process now loads the
aspnet_isapi.dll (CLR host) and the request follows through a similar sequence of HttpModules and HttpHandlers.
So the important thing to note here is that w3wp.exe is not an ASP.NET worker process (unlike aspnet_wp.exe) but instead specific to IIS 6.0.
Conclusion: if you use IIS6.0 or later, you will view the w3wp.exe rather than aspnet_wp.exe.
</div>
Please mark the replies as answers if they help or unmark if not.
Feedback to us
vijayvishwan...
Member
30 Points
18 Posts
aspnet_wp.exe (or w3wp.exe) not running
Oct 10, 2011 08:16 PM|LINK
Hi,
I am using Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1, IIS EXPRESS 7.5
when I want to debug a page using dbgclr.exe, I am not able to find aspnet_wp.exe (or w3wp.exe) (they are not running).
What is the solution to this?
Vijay Vishwanath
Slicksim
Participant
1925 Points
350 Posts
Re: aspnet_wp.exe (or w3wp.exe) not running
Oct 11, 2011 08:01 AM|LINK
Hi,
I don't think they do, look for an iisexpress instance, it is that which will be serving your pages.
HTH
Si
vijayvishwan...
Member
30 Points
18 Posts
Re: aspnet_wp.exe (or w3wp.exe) not running
Oct 11, 2011 09:51 AM|LINK
Hi,
Thanks for the reply.
I see 2 processes - 1. iisexpress.exe
2. iisexpresstray.exe
But, when i try to attach to the iisexpress.exe process, I get an error message - "Unable to attach to the process. The debugger was unable to automatically select an appropriate type of code. Please manually specify the type(s) of code to which the debugger should attach."
What is the solution to this?
Vijay Vishwanath
Slicksim
Participant
1925 Points
350 Posts
Re: aspnet_wp.exe (or w3wp.exe) not running
Oct 11, 2011 10:58 AM|LINK
Hi,
Have you tried, native code and script?
Si
vijayvishwan...
Member
30 Points
18 Posts
Re: aspnet_wp.exe (or w3wp.exe) not running
Oct 11, 2011 11:12 AM|LINK
Hi,
How do I select these options?
Vijay Vishwanath
vijayvishwan...
Member
30 Points
18 Posts
Re: aspnet_wp.exe (or w3wp.exe) not running
Oct 11, 2011 03:14 PM|LINK
Hi,
In type of process, I am getting - TSQL/x86 for iisexpress
Vijay Vishwanath
vijayvishwan...
Member
30 Points
18 Posts
Re: aspnet_wp.exe (or w3wp.exe) not running
Oct 11, 2011 07:48 PM|LINK
Hi,
I am also not getting "Managed Code" as the type for the iisexpress process.
Vijay Vishwanath
Mamba Dai - ...
All-Star
23531 Points
2683 Posts
Microsoft
Re: aspnet_wp.exe (or w3wp.exe) not running
Oct 12, 2011 08:17 AM|LINK
Hi,
This article describes how to configure your ASP.NET application for debugging, how to attach to the ASP.NET worker process (Aspnet_wp.exe) with the Microsoft CLR Debugger, and how to debug the application:
http://support.microsoft.com/kb/301058
Feedback to us
Develop and promote your apps in Windows Store
vijayvishwan...
Member
30 Points
18 Posts
Re: aspnet_wp.exe (or w3wp.exe) not running
Oct 12, 2011 11:52 AM|LINK
Hi,
Thanks for the reply.
But, the ASP.Net worker process(Aspnet_wp.exe) is not running.
What is the problem here?
Vijay Vishwanath
Mamba Dai - ...
All-Star
23531 Points
2683 Posts
Microsoft
Re: aspnet_wp.exe (or w3wp.exe) not running
Oct 13, 2011 05:55 AM|LINK
Hi,
<div sizcache="7" sizset="41">The way an ASP.NET request is handled by IIS is quite different in IIS 6.0 when compared with 5.0. In 5.0, the ASP.NET worker process is handed off control by the aspnet_isapi extension in IIS. The aspnet_isapi dll runs in the inetinfo.exe process in IIS and functions what is known as the CLR host (a CLR host is the piece of unmanaged code which is responsible for loading the CLR into the memory). So aspnet_isapi “hands over” the processing to the worker process named aspnet_wp.exe, where the request passes through a series of HttpModules and an HttpHandler.
But in IIS 6.0, there is a driver named http.sys which listens to all the incoming requests (aspnet_isapi.dll is not in the picture at this point). The moment an ASP.NET specific request comes in, this driver starts an IIS 6.0 worker process (which is not related to ASP.NET at all) named w3wp.exe. This process now loads the aspnet_isapi.dll (CLR host) and the request follows through a similar sequence of HttpModules and HttpHandlers.
So the important thing to note here is that w3wp.exe is not an ASP.NET worker process (unlike aspnet_wp.exe) but instead specific to IIS 6.0.
Conclusion: if you use IIS6.0 or later, you will view the w3wp.exe rather than aspnet_wp.exe.
</div>Feedback to us
Develop and promote your apps in Windows Store