I usually don’t double up on previous posts, but one of the comments in that post points to the solution and I think it warrants a direct link back to the source. The solution comes from Mike Volodarsky who’s one of the Program Managers on the IIS team. It’s not the first time Mike’s found a solution for me (well, not for me specifically) and his blog is full of useful information on IIS 7 and IIS in general…
Anyway, if you want to use F5 debugging reliably with Integrated Pipeline operation under IIS 7 with Visual Studio go read this post from Mike:
http://mvolo.com/blogs/serverside/archive/2006/12/28/Fix-problems-with-Visual-Studio-F5-debugging-of-ASP.NET-applications-on-IIS7-Vista.aspx
It has all the information needed to get this working correctly. Although Visual Studio SP 1 has some fixes that makes the basics work, that alone will not work on all applications. There are a couple of issues you need to work around and Mike's post explains what the problem is and how to work around it.
As I mentioned in my previous post I ran into the exact problems that Mike mentions at the bottom of his post regarding not being able to debug one of my applications while others were working fine.
The short of it is that debugging fails if you have any modules or global.asax handlers attached that occur before the managed authentication module fires. No authentication, no debugger apparently. In my case I had a BeginRequest handler and that was enough to make this not work. In fact in my previous post I mentioned that authentication failed on global.asax access and that the authentication returned by the trace did in fact not return any authentication information…
Sure enough removing the BeginRequest module hooks made the application debug with the VS F5 debugging.
Mike also posts a ‘F5 debug helper’ module you can install (along with an easy script to register and unregister it in your global applicationhost.config). Looks like this module pre-authenticates requests very early on – failures now even in Application_BeginRequest show that there’s an authenticated user. It's meant for debugging only and shouldn't be installed on a live server...
So yay! The debugging works again...
Other Posts you might also like