After response.redirect Session lost the value

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?
Bharat GuruAsked:
Who is Participating?
 
Bill NolanConnect With a Mentor Owner, Lead Technology ProgrammerCommented:
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
 
Bill NolanOwner, Lead Technology ProgrammerCommented:
Response.Redirect will end the response by default.

Use Response.Redirect("detail.aspx", false);
0
 
Bharat GuruAuthor Commented:
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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Bill NolanOwner, Lead Technology ProgrammerCommented:
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
 
eridanixCommented:
Hi,

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

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


Delete cookeis and than try again.
0
 
Bharat GuruAuthor Commented:
We are using web garden as 5
0
 
Bharat GuruAuthor Commented:
EnableSessionState="True and  web garden as 500 doesn't help
0
 
Bharat GuruAuthor Commented:
process set to 1 also doesn't work
everything doesn't work except server.transfer
0
 
Bill NolanOwner, Lead Technology ProgrammerCommented:
After you make the IIS change restart the server.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.