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.
It depends on how you have session configured, but if it’s normal
InProcsession 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.