title: ASP.NET Core Session Timeout
body: <p>I remember we have used session.timeout in ASP.NET to change the session timeout which was 20 minutes if not changed.</p>
  
  <p>I tried to change the session time out in ASP.NET Core 3.1 in Startup.cs but nothing happens. I use Identity for operators and set the Idle Timeout for 5 hours 'I Think' but operators sign out after 1-2 minutes and should re-login hundreds of times for completing an article.</p>
  
  <pre><code>services.AddSession(options =&gt;
  {
      options.IdleTimeout = TimeSpan.FromHours(5);
      options.Cookie.HttpOnly = true;
      options.Cookie.IsEssential = true;
  });
  </code></pre>
  
  <p>What am I missing ??</p>