Rick Strahl's Web Log

Wind, waves, code and everything in between...
ASP.NET • C# • HTML5 • JavaScript • AngularJs
Contact   •   Articles   •   Products   •   Support   •   Search
Ad-free experience sponsored by:
ASPOSE - the market leader of .NET and Java APIs for file formats – natively work with DOCX, XLSX, PPT, PDF, images and more

IIS 7 Integrated Pipeline Debugging on Vista, again


:P
On this page:

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...  

Posted in IIS  Vista  

The Voices of Reason


 

# DotNetSlackers: IIS 7 Integrated Pipeline Debugging on Vista, again


ericappel.net
January 04, 2007

# ericappel.net - Using Visual Studio 2005 on Vista

Life and times of C++/C# developer

Pieter Siegers
January 04, 2007

# re: IIS 7 Integrated Pipeline Debugging on Vista, again

Hi Rick, it seems using a global.asax is a bit out of date, since new projects in VS.NET don't add it anymore; instead you can use HttpModules - see for example
http://codebetter.com/blogs/karlseguin/archive/2006/06/12/146356.aspx
HTH, Pieter

Rick Strahl
January 04, 2007

# re: IIS 7 Integrated Pipeline Debugging on Vista, again

Peter - not quite sure what you mean by not supported anymore. Sure they are, it's just the codebehind file gets stored in APP_CODE. I see no reason to create a module for application specific code, really. Realistically global.asax is just like a module with pre-implemented event handler hooks.

And FWIW the issue above still applies to Modules the same way as to global.asax. The issue is that the debugger can't trigger before authentication has occurred.

West Wind  © Rick Strahl, West Wind Technologies, 2005 - 2019