title: Cookie expire date in the past in asp.net mvc
body: <p>I'm writing/updating a cookie, however every time I do this and I look at the chrome dev tools, it tells me the cookie expires 30 minutes ago, not 30 minutes from now. </p>
  
  <pre><code>HttpCookie cookie;
  
  if (Request.Cookies.AllKeys.Contains(name))
  {
    cookie = Request.Cookies[name];
  }
  else
  {
    cookie = new HttpCookie(name);
  }
  
  cookie.Value = value;
  cookie.Expires = DateTime.Now.AddMinutes(30);
  Response.Cookies.SetCookie(cookie);
  </code></pre>
  
  <p>Does anyone know why this happens?</p>