?
Solved

After response.redirect Session lost the value

Posted on 2011-09-22
9
Medium Priority
?
679 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Lots of people ask this question on how to extend the “MembershipProvider” to make use of custom authentication like using existing database or make use of some other way of authentication. Many blogs show you how to extend the membership provider c…
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…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month14 days, 6 hours left to enroll

771 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