Alex Rivera | Logout

ASP.NET Session Cookies - specifying the base domain

Asked 2010-02-24T14:06:55.853
21

By default, ASP.NET will set its cookies to use "mydomain.com" as their base. I'd prefer to have them use "www.mydomain.com" instead, so that I can have other "sub.mydomain.com" subdomains that are cookie-free.

I've done some digging into the Session and Cookie objects, and while I can find how to set the domain for a single cookie, I don't see a way to set it for all Session cookies.

Anybody ideas?

Edit
Report

1 Answer

1

Session uses only one cookie, so why don't you set domain only for ASP.NET_SessionId cookie ?

answered 2010-02-24T14:10:04.030

Your Answer