[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

After response.redirect Session lost the value

Posted on 2011-09-22
9
Medium Priority
?
714 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
  • 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 500 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

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Integration Management Part 2
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses
Course of the Month17 days, 21 hours left to enroll

830 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