Hello,
I've read somewhere that sessionstate does not work when a browser has
disabled cookies, so I wanted to test this and did the following:
I added two aspx pages (c#), in the first I set a session variable like
this: Session["Test"] = "Hello";
On the first page there is a button that navigates to the second page,
like this: Server.Transfer('Default2.aspx');
In the second page in the load event, I do this:
Response.Write(Session["Test"];);
After this, I disabled all cookies in my browser (internet explorer 6)
bij using the privacy tab in IE Options. But after disabling the
cookies, my project still works fine! How's this possible or am I
understanding something wrong here?
Greetings,
Chris
Anthony Jones - 12 Feb 2008 10:05 GMT
> Hello,
>
[quoted text clipped - 14 lines]
> cookies, my project still works fine! How's this possible or am I
> understanding something wrong here?
Most likely the site you are visiting is being seen as a member of the
trusted or intranet zone (probably because you are not using a FQDN). IE
will allow Session cookies for such sites regardless of your privacy
settings.

Signature
Anthony Jones - MVP ASP/ASP.NET
Chris Zopers - 12 Feb 2008 10:26 GMT
Okay, that should be the reason, because I tested this in my visual
studio project.....thanks!
Aidy - 12 Feb 2008 10:25 GMT
> On the first page there is a button that navigates to the second page,
> like this: Server.Transfer('Default2.aspx');
The Session object will work, it just won't "remember" between page calls.
When you Server.Transfer you are still within the same page call so the
values you set are still in the Session. Do a Response.Redirect instead for
a better test.