So I came across this sweet little problem that I wasn’t able to attach to IIS 7.5 from my VS 2012 on Windows 7 and I want to share the solution with you.
I am taking part on development of larger ASP.NET WebForms 4.5 application and we are using local SQL server + local IIS 7.5 on Windows 7. From some point in time, I wasn’t able to attach to IIS w3wp.exe process. Every other process I was able to attach however and I was puzzled. The note I had from VS 2012 was looking like this :
The problem was, that I wasn’t for some time creating any server side code (I was playing on the client) and I installed some tools and programs that might changed something. Another problem was, that I could inspect the w3wp.exe in say Process Explorer but I wasn’t able to find any tool that would tell me : what process in attached to some particular process of my interest (if you know any tool that can do this, please share, thank you). I googled and binged but most of the problems I found were about Developer Tools in IE attached to IE itself and nothing that could help me.
Today I had some time to fiddle around and the solution is simple :
I was playing with this tool from Microsoft : Debug Diagnostic Tool 1.2 which is able (if you create a rule for that) to listen to IIS and collect exceptions. I created a rule some time ago and I forgot to deactivate it. So everytime IIS started, it attached and collected the data. I told DDT to do so. And I was second in a row. If you deactivate the running/attached rule, VS will be able to attach again.
Just don’t forget to do so.
Hope this will save you some time. :) Enjoy.