0

The ASP.NET MVC application after deploying to Hosting environment (Windows server 2008 R2, IIS7) works as expected - until the IIS application pool is recycled. The IIS administrator has configured application pool to be recycled at regualr intervals.

After application pool recycles the application returns the following error.

"The Icontrollerfactory did not return a controller for the name"

The routes are initialized in Application start event in Global.asax.

The full exception is "The IControllerFactory "Controllers.ControllerFactory" did not return a controller for the name "ProductStatus".

The stack trace says

at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) 
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.I‌​ExecutionStep.Execute() 
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
burning_LEGION
  • 13,246
  • 8
  • 40
  • 52
  • Can you show us the full exception and the code where its thrown? – jrummell Jun 13 '12 at 13:41
  • The full exception is "The IControllerFactory "Controllers.ControllerFactory" did not return a controller for the name "ProductStatus". The stack trace says at System.Web.Mvc.MvcHandler.ProcessRequestInit(HttpContextBase httpContext, IController& controller, IControllerFactory& factory) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) – user1453756 Jun 13 '12 at 15:05
  • @user1453756 the exception information should be in your Question so i edit it for you :) – Wahid Bitar Jun 14 '12 at 12:45

0 Answers0