title: Session Cookie never set in asp.net core
body: <p>I am trying to configure sessions for an asp.net core 2.0 website, but the session cookie is never set.</p>
  
  <p>I call ..</p>
  
  <pre><code>app.UseSession();
  </code></pre>
  
  <p>...in Startup.Configure and ...</p>
  
  <pre><code>        services.AddDistributedMemoryCache();
  
          services.AddSession(options =&gt;
          {
              options.IdleTimeout = TimeSpan.FromMinutes(10);
              options.Cookie.HttpOnly = false;
              options.Cookie.Name = "WS_AUTH_ID";
          });
  </code></pre>
  
  <p>... in the ConfigureServices method.</p>
  
  <p>In the Controller I can acess ...</p>
  
  <pre><code>HttpContext.Session.Id;
  </code></pre>
  
  <p>... but the id is always different for every request.</p>
  
  <p>Am I missing something?</p>
  
  <p>Update: I should metion that I can set cookies "manually" and the browser will "receive" them.</p>
  
  <pre><code>HttpContext.Response.Cookies.Append("Test_cookie", "yo");
  </code></pre>