title: The SessionStateTempDataProvider requires SessionState to be enabled
body: <p>My hybrid (web forms/MVC) project is working fine in my local development environment BUT when I deploy (xcopy) to my Test environment I get the error that SessionState is needed (full error shown below).</p>
  
  <p>What's strange about this error message is that session state is set as <strong>InProc</strong> in my web.config and IIS7 configuration shows it as as well.</p>
  
  <p>I'm running a classic web forms site and only have one small section that I'm moving over to MVC 1.0. And now my regular web forms default.aspx page isn't able to come up! </p>
  
  <ul>
  <li>I <strong>don't</strong> use the TempData provider at all in MVC so I'm guessing the framework does for some reason but heck, my SesionState is Enabled... </li>
  <li>My test environment is running on IIS 7 in Integrated mode with my webconfig with sessionstate as InProc and works fine. </li>
  </ul>
  
  <p>More Info: For fun I created a stub project that was MVC only and deployed it to the Test environment and it worked fine! The <strong>web.config's</strong> are essentially the same and one works and the other doesn't. </p>
  
  <p>Any help is appreciated.</p>
  
  <hr>
  
  <h2>Error Message</h2>
  
  <h2>Server Error in '/' Application.</h2>
  
  <p>The SessionStateTempDataProvider requires SessionState to be enabled.
  Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 
  Exception Details: System.InvalidOperationException: The SessionStateTempDataProvider requires SessionState to be enabled.
  Source Error:
  An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</p>
  
  <p>Stack Trace:</p>
  
  <p>[InvalidOperationException: The SessionStateTempDataProvider requires SessionState to be enabled.]
     System.Web.Mvc.SessionStateTempDataProvider.LoadTempData(ControllerContext controllerContext) +247928
     System.Web.Mvc.TempDataDictionary.Load(ControllerContext controllerContext, ITempDataProvider tempDataProvider) +30
     System.Web.Mvc.Controller.ExecuteCore() +71
     System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +209
     System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +599
     System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +171</p>