Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging ASP.NET in IIS 7

I have searched all the usual but come up empty. I must be doing something silly!

Simply I created a new project, ASP.NET Web App, and wish to use and debug it with the local install of IIS 7.5 on my Windows 7 x64 box.

According to what I have read it should be a simple process; my issue is that Visual Studio will not stop at breakpoints nor at errors etc.

I just don't get it:

  • Visual Studio is attaching to the w3p process for me automatically.
  • If I hover over the breakpoints it shows a message saying the same, that it is in the same w3p process.
  • I am in Administrator context. I manually ran it like so to be sure but in any case if you are an admin it runs like that anyway.

Some notes:

  • I do not wish to use IIS Express as I require native IIS 7.5 for my tasks, however it does debug in express - no surprise there.
  • As mentioned above, all this is being done locally.
  • The path of the virtual directory is pointed towards the project files, as set by Visual Studio 2010. It even set the Network Service as read on the folder structure.
  • When debugging from VS the web site runs fine, just debugging is the issue.

Maybe it is permissions? The Default App Pool is using the ApplicationPoolIdentity not Network Service... Should it be? I had assumed they we.re one and the same essentially. Although I changed this and no luck unless I didn't do something I should of

Keep in mind here that my issue is semi-unique in that I am not receiving error messages, not even in the event logs... For all intents and purposes it should be working fine, just it isn't.

VS and IIS, and all updates, are applied to date.

Note: I'm familiar with IIS7.5, I run my own public web hosting server. I just never tried to debug

Note: It is Visual Studio 2010 Ultimate

Thanks for your time.

like image 313
Anthony Avatar asked Dec 12 '25 22:12

Anthony


2 Answers

Sigh!

I went back to basics... Uninstalled IISExpress and tested; It worked! Re-installed IISExpress; It worked!.

I guess installing IIS7 native after IISExpress did something screwy? I had ran the register ISS command on IIS7 when I installed it.

Right, so now I have both installed in tandem and they work fine. Thanks for all your help guys, appreciated.

like image 106
Anthony Avatar answered Dec 14 '25 18:12

Anthony


you can try right-click on project in VS go to properties select web from left menu tab. Check if ASP.NET debugger is checked and also you can select Use Local IIS Server and give localhost url there (in project Url textbox) and then Say start debugging from VS and put breakpoints.

like image 41
DotNetUser Avatar answered Dec 14 '25 18:12

DotNetUser