Solved

Session values lost when Response.Redirect method is called

Posted on 2009-04-08
5
2,915 Views
Last Modified: 2013-12-17
Hello,

I have moved my web site over from IE6 to IE8 and have noticed that session values are being lost. So I excluded the .config file from being scanned by the anti virus software i am using and have included the following in my .config file:
<sessionState mode="InProc" timeout="50000" cookieless="false">

Session values are now being lost when Response.Redirect method is called.
Any clues why this is occuring and how it can be solved?
0
Comment
Question by:WalterRautenbach
  • 3
  • 2
5 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 24095679
This is a common problem, check out:
http://weblogs.asp.net/bleroy/archive/2004/08/03/207486.aspx

that explains the problem in more detail, as well as the solution
0
 

Author Comment

by:WalterRautenbach
ID: 24122740
No, i am using the Response.Redirect("~/Default.aspx",false) but this does not help me. The website was working perfectly until i upgraded my explorer from IE6 to  IE8.
0
 
LVL 53

Expert Comment

by:Dhaest
ID: 24135351
Are you're coockies enabled on the ie8-browser ?

Why won't my session variables stick?
http://classicasp.aspfaq.com/general/why-won-t-my-session-variables-stick.html
0
 

Author Comment

by:WalterRautenbach
ID: 24156393
Sorry, this does not help me. I have tested the same website in IE 6 and it works fine, but in IE 8, sessions that are set, are null when i Redirect.
0
 

Accepted Solution

by:
WalterRautenbach earned 0 total points
ID: 24157831
I clear out the page from the cache before redirected. I noticed that when coming back to the page, the page is not rebuilt, but just reloaded from the cache.
I also added this code:
<meta http-equiv="pragma" content="no-cache">. This solves my problem.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question