I have an ASP.NET 3.5 sp1 app that's in development in Cassini. The app includes a global.asax file that should run some code - it works fine in Cassini but in IIS the debugger never hits the function. Why doesn't that code run?
You're manually attaching the debugger to the w3wp.exe process? Most likely you're simply too late and the Application_Start already ran by the time the debugger attaches.
Are you sure that the code isn't being executed or could it be that you are simply attaching to the process too late for the debugger to be of any use for it? I'd suggest adding some logging to the method to be sure.
Maybe in Cassini, the Application is started when Cassini is launched. In II7, a service, the application is already started and when you launchh the debugger, VS attached only the debugger. You can try to launch the debugger and recycle the pool in the IIS console to see the application restarted ?
I'm seeing the same issue with a WCF web project running in IIS7. The very first line of code in Application_Start() is a logger write, and I never get it. Also, other objects that are supposed to be initialized on Application_Start never get created and the rest of my code fails because of it. Anyone ever figure anything out with this? It does run fine in Cassini...