So you try to figure out what could be wrong, which may include the following:
- Debug mode for compilation in web.config. Checked.
- A setting in IIS 7.0 Manager that you’re unfamiliar with. Well, I found a setting for server side debugging in the ASP-section, which existed before. Turning it on didn’t seem to help (why would it?).
- Maybe something with the application pool? There is a mode for “Managed Pipeline Mode”, but setting it to “Classic” didn’t seem to help (as it shouldn’t). Changing the identity of the pool didn’t help either.
- At some point I think I’ve seen something about your account having to be a member of a “debugging” group in your Windows machine. However, there are no such user groups in my local machine. <edit>It seems that this group is not necessary since Visual Studio 2005</edit>
- Also, of course, you have to run Visual Studio 2005 as an administrator, but I’ve done that since the beginning (no need to right click if you set the Properties, Compatability, Run as administrator checkbox for the icon).
I did use Process Explorer to ensure that .net was loaded in w3wp.exe, and sure enough it was.
So I found a note on the web about “Windows Authentication” being used when debugging asp.net. Now I’m not sure if this was the single thing that helped since I tried several things, but after installing “Windows Authentication” in IIS 7.0, the “Managed” code shows up in w3wp.exe and I can attach to it from Visual Studio 2005.
- Control Panel
- Turn Windows features on or off
- Internet Informaton Services
- World Wide Web Services
- Check for “Windows Authentication”
- Rebooted computer (just in case – don’t know if it was needed or even if iisreset.exe would have been necessary)
Please write a comment if you’ve had the same problem, and got it solved the same way I did, or if you did something else/more to get it working.
<edit>Although primarily about pressing F5 to automatically attach to w3wp.exe, this blog post talks about what needs to be done.</edit>