title: .Net cookies keep coming back with expiration of zero
body: <p>I am having trouble with the .Expires cookie attribute.  It keeps coming back with 01/01/0001 12:00 AM, when I read the cookie back.</p>
  
  <p>Here is the code.  I added in the retrieve just below the save solely for debugging purposes.  The save and retrieve happen in different places in the same file.  I purposely did not specify a Domain, as I want the cookie to exist site wide.</p>
  
  <p>The data shows up nicely, just not the expiration.</p>
  
  <p>Note: I am testing under Visual Studio 2012 running under local host using .Net Framework 4.</p>
  
  <pre><code>System.Web.UI.Page oPage = this.Page;
  
  HttpCookie oCookie = new HttpCookie("UserData");
  
  // Set the cookie value.
  oCookie.Secure = false;
  oCookie["Field1"] = strField1;
  oCookie["Field2"] = strField2;
  oCookie.Expires = DateTime.Now.AddDays(1);
  
  // Add the cookie.
  oPage.Response.Cookies.Add(oCookie);
  
  
  // Get the cookie.
  oCookie = new HttpCookie("UserData");
  oCookie = oPage.Request.Cookies["UserData"];
  </code></pre>