views:

146

answers:

1

Not using Cassini, but IIS7 to run an ASP.NET app.

The debug behavior is flakey. Sometimes it works, sometimes it doesn't. I was able to step into the application start event in global.asax but sometimes I can't.

Sometimes VS2008 opens the published global.asax so I have two instances of global.asax opened in VS, the source and the published.

I reset the AppDomain and IIS and I can't put my finger on why this is happening. Any clues?

To add, while it won't go into application start, I have an OnChangeEventHandler event - it does step into the event handler.

+2  A: 

Visual Studio doesn't connect to w3wp.exe soon enough to handle breakpoints in Application_Start for IIS7-hosted applications. To debug, use the following line to call debugger explicitly,

System.Diagnostics.Debugger.Launch();

and choose to launch a new instance of Visual Studio.

MOZILLA
Thanks. Any other practical iis7 gotchas like this?
Steve