title: Microsoft.Owin.Host.SystemWeb and still getting No owin.Environment item was found in the context
body: <p>I've read lots of posts on this but still can't get this to work.
  I'm using Visual Studio 2013.  I created a new MVC 5 Project and thought it would be cool to use the new facebook login integration.  It works fine on my PC in IIS Express.</p>
  
  <p>But when I upload it to the Production server I keep getting the very annoying "No owin.Environment item was found in the context" message.</p>
  
  <p>Here's what I've done.</p>
  
  <ol>
  <li>I never changed the name of my project or assembly.</li>
  <li>The assembly name is Wodivate</li>
  <li>The namespace is Wodivate</li>
  <li><p>I have the default Startup.cs class which contains the following:</p>
  
  <pre><code>using Microsoft.AspNet.Identity;
  using Microsoft.Owin;
  using Microsoft.Owin.Security.Cookies;
  using Owin;
  using System.Web.Http;
  
  [assembly: OwinStartupAttribute(typeof(Wodivate.Startup))]
  namespace Wodivate
  {
      public partial class Startup
      {
          public void Configuration(IAppBuilder app)
          {
              ConfigureAuth(app);
          }
  
      }
  }
  </code></pre></li>
  <li><p>In the App_Start there is a Startup.Auth.cs file which contains:</p>
  
  <pre><code>using Microsoft.AspNet.Identity;
  using Microsoft.Owin;
  using Microsoft.Owin.Security.Cookies;
  using Owin;
  
  namespace Wodivate
  {
      public partial class Startup
      {
          // For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
          public void ConfigureAuth(IAppBuilder app)
          {
              // Enable the application to use a cookie to store information for the signed in user
              app.UseCookieAuthentication(new CookieAuthenticationOptions
              {
                  AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
                  LoginPath = new PathString("/Account/Login")
              });
              // Use a cookie to temporarily store information about a user logging in with a third party login provider
              app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
  
              // Uncomment the following lines to enable logging in with third party login providers
              //app.UseMicrosoftAccountAuthentication(
              //    clientId: "",
              //    clientSecret: "");
  
              //app.UseTwitterAuthentication(
              //   consumerKey: "",
              //   consumerSecret: "");
  
              var facebookOptions = new Microsoft.Owin.Security.Facebook.FacebookAuthenticationOptions()
              {
                  AppId = "xxxxxxxxxxxxxxxxxxx",
                  AppSecret = "xxxxxxxxxxxxxxxxxxxxxxxxx"
              };
              facebookOptions.Scope.Add("email"); //We want to get user's email information by adding it in scope.
              app.UseFacebookAuthentication(facebookOptions);    
  
              //app.UseGoogleAuthentication();
          }
      }
  }
  </code></pre></li>
  <li><p>My Web.config file includes:</p>
  
  <pre><code>&lt;add key="owin:AppStartup" value="Wodivate.Startup, Wodivate" /&gt;
  &lt;add key="owin:AutomaticAppStartup " value="false" /&gt;
  </code></pre></li>
  <li><p>I also made sure to follow the post on <a href="https://stackoverflow.com/questions/22650168/no-owin-environment-item-was-found-in-the-context-only-on-server">No owin.Environment item was found in the context - only on server</a> and installed Microsoft.Owin.Host.SystemWeb</p></li>
  </ol>
  
  <p>Anyone else stuck on this?  I've been hitting a wall for 3 days.</p>