I have created an HttpCookie in order to share data across a subdomain :
HttpCookie cookie = new HttpCookie("sessionGUID");
cookie.Value = value;
cookie.Domain = ".example.com";
Response.Cookies.Set(cookie);
I carelessly assumed since it is a 'session' cookie (no expires) that it would expire along with my ASP.NET session. Of course to the browser this is a 'browser session' cookie and not linked to the ASP.NET session.
What I want to do is expire these 'browser session' cookies along with the ASP.NET session.
i think I just need to set Expires to the same value as the ASP.NET session. How would i determine this programatically?