I'm trying to move an ASP.Net MVC app from 3.5 to 4.0 but running into issues. The upgrade went smoothly enough and the application runs on the Cassini server but when run on IIS7 the following error is thrown:
[HttpException (0x80004005): User is not available in this context.] System.Web.HttpApplication.get_User() +4640350 System.Web.Handlers.ScriptModule.Init(HttpApplication app) +26 System.Web.Handlers.ScriptModule.System.Web.IHttpModule.Init(HttpApplication context) +15 System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +546 System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325 System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407 System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375
[HttpException (0x80004005): User is not available in this context.] System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11523504 System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4777557
The app ran/runs fine on IIS7 when using 3.5 - The routing is working and I'm able to break in the Global.asax file going over the routes and setting up the controller factory. I set up a second simple test application to see if this was unique to the app or happening across the board and was able to replicate the error requesting any URL from the test app. I've tweaked and reset any number of IIS configuration settings and tried disabling the ScriptModule, all to no avail.
Any help is appreciated.