0

I'm using a session to hold a class. In the class are things like first name, last name, Message.

I have information in the first name and last name and on each page i go to i can retrieve that information. Now after the session is created, if i give the message property a value and destroy the session and recreate it, all three properties show up as being populated.

However, when i do a response.redirect the message property is lost but the other two are still there.

I've tried doing response.redirect("PageName.apsx",false) but that has not helped my cause.

Why would the message property be dropped?

2
  • Please show example of your code. I think this is too specific to be answered without more info Commented Aug 19, 2011 at 15:48
  • Are you doing the Response.Redirect after setting the saving the object to session? Commented Aug 19, 2011 at 15:55

1 Answer 1

1

This is a bit hard to follow. You:

  1. create a session and assign the message property.
  2. you destroy the session (why?) btw I never trust a session kill before a redirect is complete because the client still retains a session id cookie until the request is complete.
  3. magically all three properties are still in the session (you didnt mention when you assign first/last to the session
  4. you redirect and the first two (which you never state where they are set) are lost.

It sounds as though you are creating a new session and setting the message. However the client is sending over the old session id which the server still considers valid. Without seeing how you are killing the session and which session ids are being set/sent in the response/request headers its hard to see (plus no code provided)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.