简体   繁体   中英

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.

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.

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.

前几天我遇到了类似的问题,我将调试器附加到了错误的w3p进程,请确保将其附加到运行应用程序池标识的进程。

I wanted to write it as comment by I don't think I can add pictures.. Are you sure you are running the same version of dll?

Is your breakpoint filled like this? 在此输入图像描述

or hollow like this? 在此输入图像描述

1st go to ,Program and Feature in control panel and then in that turn on or off windows features. and now check all check boxes(activate features) related to Internet Information server & windows service managers. once this is done run your visual studio as administrator and then attach to right w3p process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM