Solved

After response.redirect Session lost the value

Posted on 2011-09-22
9
662 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:Slimfinger
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:Slimfinger
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
 
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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 

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:
Slimfinger 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:Slimfinger
ID: 36591034
After you make the IIS change restart the server.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now