Solved

Session values lost when Response.Redirect method is called

Posted on 2009-04-08
5
2,906 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now