Developer forum

Forum » Development » Session Lost in webkit browsers

Session Lost in webkit browsers


Reply
 Hello!

I have a strange problem!

Set this in your host file to see it online : 81.95.241.216                 test.sainttropez.com

What happens here is that i have made some code in that is executed in the page load in default.aspx. What it does is detect the browser language and then redirects the user to the a subdomain. Pretty basic.

HttpContext.Current.Session["NIQSelectedCountry"] = cic.Ietfcode;
                        
                        HttpContext.Current.Response.Redirect("http://" + cic.ISOCountryCode + "." + domain,true);

to make the redirection work set your browser language to dk or gb-uk and set in the host file again 81.95.241.216                 dk.test.sainttropez.com or gb.test.sainttropez.com

In IE the session is stored and i can get it, but in Chrome and FF its not. I googled some and only thing i could find was people speaking about the sessionID is stored in a cookie, i have checked and this cookie is present in Chrome - so i cant seem to figure out why the session is missing and why it is browser specifik ? So thats why im posting here, might be DW related.

BTW - I alert the session value out in a PageTemplateExtender after the redirection, if it matters.

Does anybody have any idea what is going on?


 

Replies

 
Reply
Hello,

I believe that your problem has nothing to do with Dynamicweb. Anyway, in case of using an InProc session state (which is used by Dynamicweb by default) the session ID is stored in the cookie which is not accessible across different domains (or sub-domains).

Although there seems to be a way when you can share the session cookie across multiple domains. Take a look at this SO question: http://stackoverflow.com/questions/2326521/asp-net-session-cookies-specifying-the-base-domain

- Pavel



 
Reply
 Hi Pavel.

Sounds like this could be the reason, but to bypass this i need to alter how the cookies are stored and the name of them. I'm not sure, but would't this create other problems in dw?

Another solution could be

<sessionState mode="InProc"
cookieless="true"
timeout="20"/>

But again this would not work with dw correct?

Thanks for the help


 
Reply
Hello,

Dynamicweb doesn't rely on any particular Session State mode. However it hasn't been tested (and therefore it's not guaranteed) that the system will behave correctly with a cookieless session (there might be some issue with customized URLs).

- Pavel

 

You must be logged in to post in the forum