Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Session values lost when Response.Redirect method is called

Posted on 2009-04-08
5
Medium Priority
?
2,925 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

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

704 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