title: .net core 3.1 cannot delete cookies
body: <p>I have web app based on .net core3.1 and iis server.
  For some reason, I cannot delete cookies on logout.
  I tried <code>Response.Cookies.Delete(cookie.Key);</code> and <code>Response.Cookies.Append(cookie.Key, "", options);</code>
  with <code>options.Expires = DateTime.Now.AddDays(-1)</code> and <code>options.MaxAge = new TimeSpan(0);</code>, but this still doesnt work.</p>
  
  <p>The problem does not appear when I run the project on localhost.</p>
  
  <p>My configuration in startup.cs file.</p>
  
  <p>ConfigureServices:</p>
  
  <pre><code>services.Configure&lt;CookiePolicyOptions&gt;(options =&gt;
  {
      // This lambda determines whether user consent for non-essential cookies is needed for a given request.
      options.CheckConsentNeeded = context =&gt; true;
      options.MinimumSameSitePolicy = SameSiteMode.None;
  });
  
  services.AddSession(options =&gt;
  {
      options.IdleTimeout = TimeSpan.FromMinutes(15);
      options.Cookie.IsEssential = true;
      options.Cookie.Name = "b2bApp";
  });
  services.ConfigureApplicationCookie(options =&gt;
  {
      // Cookie settings
      options.Cookie.HttpOnly = true;
      options.Cookie.SecurePolicy = CookieSecurePolicy.SameAsRequest;
      options.Cookie.SameSite = SameSiteMode.Strict;
      options.Cookie.IsEssential = true;
      options.Cookie.Name = "b2bApp";
      options.ExpireTimeSpan = TimeSpan.FromMinutes(15);
      options.LoginPath = "/Identity/Account/Login";
      options.AccessDeniedPath = "/Identity/Account/AccessDenied";
      options.SlidingExpiration = true;
  });
  </code></pre>
  
  <p>Configure:</p>
  
  <pre><code>app.UseCookiePolicy();
  app.UseSession();
  </code></pre>