Developer forum

Forum » Dynamicweb 9.0 Upgrade issues » Use domain for cookies not working after >9.9 upgrade

Use domain for cookies not working after >9.9 upgrade

Arnór Halldórsson
Arnór Halldórsson
Reply

Hi,

We noticed that the "Use domain for cookies" setting stopped working after we upgraded one of our solutions to 9.9.8, we also couldn't change the value of the check box in the admin so we updated to 9.10.5. That fixed the checkbox but the cookies are still created using the full host name instead of just the primary domain. 

I noticed some changes in the source code where the flag was updated to a boolean instead of the good old 0 / 1, could the Dynamicweb.Environment.CookieManager.ResponseSetCookie() method be failing to parse the boolean value from the new field?

Best regards,
ArnĂ³r Geir


Replies

 
Nicolai Pedersen
Reply

Hi Arnor

Uh, our #1 hate feature :-). Caused a lot of troubles and support...

I think it is related to that change - it has been changed to use a nullable boolean, but the condition did not take that into consideration.

#1573 out with next nuget release of Dynamicweb.Environment

 
Nicolai Pedersen
Reply
This post has been marked as an answer

Strike that...

It seems to work - the config key has a new name as part of the change: UseDomainAndNotHostNew.

Also remember to clear your cookies if they have been set first...

Votes for this answer: 2
 
Arnór Halldórsson
Arnór Halldórsson
Reply

Aaaaaaaaaand it works... I'd previously only cleared the cookies for that specific site, although I did it multiple times (even tested it in chrome guest mode and another browser), but after going into the admin and manually changing the config value to False, checking the checkbox again to make it True and completely clearing all browser cookies, history and cache, it worked :)

Me and my 47 chromosomes will be in the corner if you need me.

 

You must be logged in to post in the forum