Session variable lost between pages

  • Thread starter Thread starter Marc Rivait
  • Start date Start date
M

Marc Rivait

Here is a very interesting scenario.

I have a simple test application that loads a page and sets a session
variable on the load event. On the first page there is a link to a second
page. The load event of the second page displays the value of the session
variable.

The problem is that when I use a W2k machine, this little test works
perfect. Session variable value is displayed on the second page. However,
when I use my XPPro machine, the session variable is lost and nothing is
displayed.

Same version of IE. Same ASP.NET server. Just a different browser. I have
already played around with the privacy settings with no success. I am not
suspect of the server at this point, because the w2k computer works fine.

Any thoughts would be appreciated.

Thanks,
Marc.
 
Are you sure that the session state setting is enabled within IIS? Although
ASP.Net may be setup the same, and the application settings may be the same,
the IIS settings themselves are a little different between IIS 5.0 and 5.1.
Session state usually starts with the web server itself and then it goes
down to ASP/ASP.Net so I would suspect IIS first, then the ASP/ASP.Net
settings second.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
Thanks Mark.

There is only one server that I am hitting from two different browsers,
therefore I believe the problems lies within the browser since the server is
the same.

Session state is enabled on the server.

Marc.
 
I am away from my computer with VS .Net, so I can't check, but as I recall
there are different methods for persisting the session variables. I think
one of them uses cookies. Is it possible that is the method being used for
your site and that the computer losing the session variables does not accept
cookies.
 
Have completed disabled the privacy settings on the computer losing the
session variable. My thinking was the same that it must be related to
cookies, but this has not helped.

Marc.
 
I have found the answer and am posting it here to help anyone else avoid my
pain! So simple is the answer. ZoneAlarm Pro.

It seems that using any of the privacy settings in ZoneAlarmPro cause some
very unusual problems with asp.net. Zonealarm was consuming the cookies
causing the session to be reset on each postback. I have disabled the
privacy settings and everything is back to normal. In doing some research
on the web, I have read the Norton and Blackice do not create this problem.
This is something I will be doing more research into to confirm it for
myself.

My advice to all is when experiencing any problem with asp.net the first
thing you should do is disable virus and firewall software. Hopefully this
is advice I will remember next time myself. It is very easy to have a
problem consume you to the point where you forget the simple basic things.

Marc.
 
Back
Top