title: Using Tempdata is crashing my application
body: <p>I'm very new to ASP.NET and am attempting to pass an object between two controllers in a web application I'm making in Visual Studio 2015. The web application is using an ASP.Net 5 Preview Template Web application (if it helps, I think I'm using beta code 7 and I'm <strong>not</strong> building for DNX Core 5). </p>
  
  <p>The problem I'm having is whenever I try to put <em>anything</em> into the TempData variable, the program seems to crash. For example, in a "Create" method I have:</p>
  
  <pre><code>        [HttpPost]
      public ActionResult Create(Query query)
      {
          switch (query.QueryTypeID)
          {
              case 1:
                  TempData["Test"] = "Test";
                  return RedirectToAction("Index", "EventResults");
              case 2:
                  break;
              default:
                  break;
          }
          return View();
      }
  </code></pre>
  
  <p>In that method, I attempt to add a simple test string under the key "test". When I run the application with that TempData statement in there, I receive an error message stating </p>
  
  <blockquote>
    <p>An unhandled exception occurred while processing the request.</p>
    
    <p>InvalidOperationException: Session has not been configured for this application >or request.
    Microsoft.AspNet.Http.Internal.DefaultHttpContext.get_Session()</p>
  </blockquote>
  
  <p>I have tried going to the Web.config located in the wwwroot element of the project and adding a "sessionState" object into a "system.web" element, but this had no effect on the error. </p>
  
  <p>Any help would be very much so appreciated as I've been looking for solutions for this everywhere. I'm hoping it's something stupid/blindingly obvious that I somehow missed. </p>