DW333
DW333

Reputation: 115

Request is not available in this context (local works), from web deploy

I cannot get the site to work, works fine on local, but once I web deploy it I get the error below.

Exception Details: System.Web.HttpException: Request is not available in this context

Stack Trace:

[HttpException (0x80004005): Request is not available in this context]
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext,          HttpContext context, MethodInfo[] handlers) +12964837
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): Request is not available in this context]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12968244
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12807949

App_start:

protected void Application_Start(object sender, EventArgs e)
{
    MvcHandler.DisableMvcResponseHeader = true;
    AreaRegistration.RegisterAllAreas();
    RegisterGlobalFilters(GlobalFilters.Filters);
    RegisterRoutes(RouteTable.Routes);
}

The site is on it's own app pool and I have also changes the app Pool from integrated to classic. Applicatiun is running, etc...

I have searched tirelessly for the last couple hours, none of the research has answered the question, I still cannot come up with a solution, does anyone have any ideas?

When in classic mode i get a "This operation requires IIS integrated pipeline mode." error.

Upvotes: 1

Views: 10197

Answers (1)

DW333
DW333

Reputation: 115

OK, it turns out that the problems where related to database tables, when the application starts it was loading clients and role actions. There was a miss match on one of the tables, so the application was throwing an exception.

On the development database the tables where fine, but on the testing database the tables had the issue above, this is why it was hard to catch at first, but when I pointed the connection strings on development from the development database to the testing database I was able to catch and fix the issue.

Thanks for the responses.

Upvotes: 2

Related Questions