Solved

After response.redirect Session lost the value

Posted on 2011-09-22
9
667 Views
Last Modified: 2012-06-21
In asp.net 3.5 framework

After response.redirect(detail.aspx) some how session loose the stored value
If Used server.transfter(detail.aspx) it keeps the value correctly.

Why response.redirect looks the value compate to server.transfer?
0
Comment
Question by:Bharat Guru
[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
  • 4
  • 4
9 Comments
 
LVL 7

Expert Comment

by:Bill Nolan
ID: 36584068
Response.Redirect will end the response by default.

Use Response.Redirect("detail.aspx", false);
0
 

Author Comment

by:Bharat Guru
ID: 36584684
even If I used Response.Redirect("detail.aspx", false);   I'm getting same thing some how all session values are empty on new page.


Default.vb
-------------
on on onl clock even
   Session("ID") = 43;
   Response.Redirect("detail.aspx", false);

Detail.vb
----------
Load()
    some how Session("ID")  becames "".
0
 
LVL 7

Expert Comment

by:Bill Nolan
ID: 36585204
Look over your debug output.  Is something causing the application to reset?

Other possibilities:

Look over IIS settings, and especially application pools.  Are you using web farm/garden (max. worker processes > 1)?

Check your host name for invalid characters.  Apparently this can interfere with cookies.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 5

Expert Comment

by:eridanix
ID: 36585863
Hi,

do you have EnableSessionState="True" in <@Page... directive?

use Response.Redirect("detail.aspx", false);


Delete cookeis and than try again.
0
 

Author Comment

by:Bharat Guru
ID: 36586095
We are using web garden as 5
0
 

Author Comment

by:Bharat Guru
ID: 36586118
EnableSessionState="True and  web garden as 500 doesn't help
0
 
LVL 7

Accepted Solution

by:
Bill Nolan earned 125 total points
ID: 36589004
LOL!  Does it work with worker processes set to 1?

If you are using multiple worker processes I think you may need to use a session service.  There could be a problem with the request going to a different  process than the one that created the session.
0
 

Author Comment

by:Bharat Guru
ID: 36590929
process set to 1 also doesn't work
everything doesn't work except server.transfer
0
 
LVL 7

Expert Comment

by:Bill Nolan
ID: 36591034
After you make the IIS change restart the server.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

734 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