Our site has a DropDownList for country and a DropDownList for language.
when a combination of those is clicked, we redirect the user to a country/language specific url, like en-us.mysite.com
the redirect happens in the ButtonClick in a user control (the UserControl is place in a MasterPage) but when the user gets redirected, the session variables are cleared when we check them in the global.asax ( in the request for the newdomain)
this happens both for true and false for the ‘responseend’ parameter in the Response.Redirect function.
is this by design?
(this is on localhost by the way, with the subdomains specified in the hosts file on my machine)
The session is cleared because the cookie tracking the session is lost, since you are crossing domains.
So yes – it’s by design. Not session design, but cookie-design.
But i believe you can allow the cookie to be shared across multiple subdomain’s, like so:
en-us.mysite.com
and
But that won’t solve your problem, since you have no control over the ASP.NET Session cookie.
So you will have to implement your own custom session mechanism, which i haven’t done so can’t really provide much help with.