Search code examples
asp.nethttpcontextsessionid

Session variables don't store with Internet Explorer 9


I am trying to pass a session variable from one page to another using this code in asp.net:

HttpContext.Current.Session["FacebookID"] = id;

This works just fine with Firefox and Chrome, but when I try to grab that value from another page in Internet Explorer 9 it won't work, I even tried it in compatibility mode. It just returns null.

Does anyone have any suggestions as to why my session variables won't store?


Solution

  • Have you got Cookies turned off in IE? If so, it wont be able to track your session unless you change the session state to cookieless...