Posted on: 8/20/2014 11:11:35 PM | Views : 404

Hey, 
 I created an application which reads a resource, sets a cookie and on a subsequent "post" reads that cookie and performs an action.
The posts being made to the page are via XmlHttpRequest. 
I'm having a strange problem. The cookie is written ( I've verified by checking the response object and by using an asp script to display it. However when the XmlHttpRequest is made to the page, the cookie is not in the collection.
From my investigation. when i create a test cookie in one aspx, then access it via another aspx it works perfectly. When I use an XmlHttpRequest for those cookies (asp in html file) that works too. So I am STUMPED. Your help is greatly appreciated.
Code to set and read cookies is below:
//Create a cookie: public void createCookie(string tokenVal) { OauthCookie = new HttpCookie("access_token",tokenVal); OauthCookie.Expires = DateTime.Now.AddDays(60.00);
< ...

Go to the complete details ...