Thursday, 1 August 2013

Debug ASP NET Web Application hosted in IIS using Visual Studio

     Generally we debug our ASP.NET web application from Visual Studio. Visual Studio has its own ASP.NET engine, which is capable enough to run and debug your web sites inside Visual Studio. However, if your site is hosted on IIS and you want to debug that site directly, how would you debug it?  When we host sites on IIS, the Worker Process (w3wp.exe) is used to run the web application. We need to attach to this particular process from Visual Studio to debug the web application.

Debug ASP NET Web Application hosted in IIS - Attach IIS Worker Process -w3wp.exe

1.Click the Tools menu  in Visual Studio and click the item Attach Process.


Debug ASP.NET Application that Hosted on IIS

2.Then search through the Available Processes with the name w3wp.exe.

how to debug asp.net application hosted in iis

3.Click the Attach button. Now you can watch your break point while doing relevant action in web page.

Advertisements
Advertisements

1 comment:

  1. I have hosted multiple web sites and multiple worker processes are created, and how can we relate which worker process belongs to which web site ?

    ReplyDelete