Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

After response.redirect Session lost the value

Posted on 2011-09-22
9
Medium Priority
?
694 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
Industry Leaders: 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 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

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.

Question has a verified solution.

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

Sometimes in DotNetNuke module development you want to swap controls within the same module definition.  In doing this DNN (somewhat annoyingly) swaps the Skin and Container definitions to the default admin selections.  To get around this you need t…
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…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
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 …

636 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