Where is the Session variable stored?

When I add an object to the Session[] dictionary, is it stored in the Browser memory? Or on the ASP.NET server? Or somewhere else?

Thanks,
newbieweb
newbiewebSr. Software EngineerAsked:
Who is Participating?
 
alokvariaCommented:
Session variable can be stored in many different ways depends on what is your requirement..You can change those settings in web.config..
Default is what lucky85 explained..
While you can also have cookie less session,
ASP.NET maintains cookieless session state by automatically inserting a unique session ID into the page's URL. For example, the following URL has been modified by ASP.NET to include the unique session ID lit3py55t21z5v55vlm25s55:


Other than that there are three mode to save session.

State Server Mode

SQL Server Mode

Custom Mode

Read below article to understand them:
http://msdn.microsoft.com/en-us/library/ms178586.aspx
0
 
Anil GolamariCommented:
Session variables will be stored on Server. Session ID is stored in a cookie. It is used to restore the session variables on the server when client's post back arrives.
0
 
newbiewebSr. Software EngineerAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.