Olivier Muhring

Olivier Muhring

  • 1.4k
  • 256
  • 7.9k

Reading a cookie from another web site

Jan 17 2018 5:11 AM
My current client works with 2 seperate websites
  1. A portal web site
  2. A booking web site

The booking web site is called from the portal, and redirects back to the portal when the booking is done.

But the booking site also exists on its own and is being managed by another party. We can't change anything on that end.

Both the portal and the booking websites can be customized, without affecting each other. This was done "by design", but currently we're facing an issue with the language settings: the language settings of the booking site should be used for the portal.

At this moment within the portal the language is setting by reading a cookie:

  1. HttpCookie cookie = Request.Cookies["LanguageCookie"]; 

The booking site uses 2 cookies for the same time:

  1. currentPOS
  2. currentLANG

The booking site runs on a sub domain of the portal site.

I've been doing some reading, and in my case I should be able to read those cookies like this:

  1. HttpCookie cookie1 = Request.Cookies["currentPOS"];   
  2. HttpCookie cookie2 = Request.Cookies["currentLANG"]; 
It doens't work, but then again, on other pages they start setting the .Domain property of the cookie.

So my question is, how do I solve this?


Answers (1)