Alright, found the solution to the problem.
HttpCookie cookie = Request.Cookies[FormsAuthentication.FormsCookieName];
cookie.Domain = ".mysite.com";
cookie.Expires = DateTime.Now.AddMilliseconds(-1);
Response.Cookies.Add(cookie);
As you can see, two things happen here:
- I'm explicitly setting the domain again for the cookie I'm handling. Apparently you have to tell the browser the domain context or it simply won't find the cookie.
- Instead of removing the cookie, I'm simply expiring it.