0
My method is wrong, that only finds out if the browser is capable of handling cookies.
To find out if cookies are enabled you have to write a cookie then read it back, if they are disabled you recieve nothing back because you have written nothing.
e.g.
HttpCookie MyCookie = new HttpCookie("test");
MyCookie.Value = "test";
MyCookie.Expires = DateTime.Now;
Page.Response.Cookies.Add(MyCookie);
HttpCookie myCookieRead = new HttpCookie("test");
myCookieRead = Page.Request.Cookies["test"];
// Read the cookie information and display it.
if (myCookieRead != null)
return true;
else
return false;
Thanks for the help given on this.
0
Cookieless is false. It just doesn't seem to matter what I do I get the same problem. The application thinks cookies are allowed.
0
That is the correct way to do it. Did you change the value of cookieless in the sessionState xml value. check your web.config under sessionState. cookieless="false"