0

Where are session variables such as...

Session["TestVariable"]

...stored?

I've used them in the past quite a lot - but I don't understand where/how long they are stored for. I'm impressed by how they can be accessed by any page or any class but yet don't understand where they reside.

4
  • possible duplicate of Session in Asp.net Commented Apr 2, 2012 at 15:37
  • @vcsjones - wrong. "When we add a variable to ASP.NET Session, where are those variables actually stored on the client side?" That question is incorrect in itself, mine is not. Mine may be a duplicate, as you say, but not of the question found on the link you provided. Commented Apr 2, 2012 at 15:47
  • The question is more-or-less the same, but if you want a completely identical question, then look at this one - your question is a subset of that one. My point is that this question has been asked plenty of times before. Commented Apr 2, 2012 at 15:51
  • Whether it's more-or-less the same is debatable. Either way, thanks for the links to the other question, I'll have a read now. Commented Apr 2, 2012 at 15:53

2 Answers 2

4

It depends on how you have session configured, but if it's normal InProc session it's stored in the memory space of the ASP.NET worker process.

Take a look at this MSDN article on session state for more information.

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

1 Comment

Thanks a lot for your answer James, makes sense, thanks for the link too.
-2

It is storied on the server side cache per user, that is why it is available after page reload. You might want to look at this for a better overview.

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.