Solved

Session values lost when Response.Redirect method is called

Posted on 2009-04-08
5
2,921 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

IP addresses can be stored in a database in any of several ways.  These ways may vary based on the volume of the data.  I was dealing with quite a large amount of data for user authentication purpose, and needed a way to minimize the storage.   …
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

626 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