Session state

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
 
A

AW

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.
 
S

Slawek

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top