Session state

  • Thread starter Thread starter Slawek
  • Start date Start date
S

Slawek

Hi everyone,

I have a problem with session state that I can't solve. I have a very simple
application with 2 aspx pages and all I want to do is to set a session
variable on first page (Session["Var1"]="Test";) and then redirect from this
page to second one and read this variable there (string sval =
Session["Var1"].ToString();). Thats all. The problem is that when I try to
do it from different computers it sometimes doesn't work properly ( I mean
on the second page I have new session with different SessionId and of course
without my variable). Any ideas why?? I think that there are some
differences between IE settings on these computers.

Thanks for any help

Regards
Slawek
 
Hi Slawek,

The problem may come from the fact that some browsers have their cookies
disabled.

Try changing the <session> tag in the Web.config to <session
cookieless='true'>, and see if the problem is solved.
 
Thanks a lot, it works fine with cookieless sessions, but I've checked
cookie settings on client browser (IE 6.0) and cookies are enabled - so the
problem is elsewhere.

Once again thanks a lot
Regards
Slawek
 
Back
Top