title: Why does setting a domain on a cookie prevent me from expiring it on-demand?
body: <p>I expire a cookie by setting the expiration in the past, like this:</p>
  
  <pre><code> myCookie.Expires = DateTime.Now.AddDays(-1d);
  </code></pre>
  
  <p>This works great...until I set the Domain.  I set the domain, like this:</p>
  
  <pre><code>myCookie.Domain = ".mydomain.com";
  </code></pre>
  
  <p>(Note the leading dot there, to encompass this domain and subdomains -- not sure if that's relevant.)</p>
  
  <p>I am trying to delete this cookie from a subdomain -- "apps.mydomain.com".  (This is the domain from which the cookie was set...)</p>
  
  <p>When I do this, it will no longer expire on-demand by setting the expiration date in the past.  I run the same code that worked prior to setting the domain, but then check the cookies, and it's still there.</p>
  
  <p>What am I missing here?</p>