There is an issue preventing the Visual Studio automatic "F5" debugging from working by default for ASP.NET applications.
When attempting to debug, you will see an error like this:
<<
Unable to cast object of type 'System.Web.HttpDebugHandler' to type 'System.Web.HttpApplication'.
------------------------------------------------
Unable to start debugging on the web server.
[InvalidCastException]: Unable to cast object of type 'System.Web.HttpDebugHandler' to type 'System.Web.HttpApplication'.
at System.Web.Hosting.PipelineRuntime.ExecuteStateHandler(IntPtr& managedRequestContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
>>
The workaround is to attach directly in Visual Studio. Open Visual Studio, go to Tools > Attach to Process, find the wp.exe process running your application, select and click Attach.
Another possible workaround is to move the application to ISAPI mode, by moving it to the "Classic .NET AppPool" or another application pool running in ISAPI mode, or by making the application pool within which this application runs to use ISAPI mode in configuration.
This issue has been fixed in post-beta2 builds but unfortunately the fix did not make it to beta2.
Thanks,
This posting is provided "AS IS" with no warranties, and confers no rights.