Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 371
  • Last Modified:

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
0
newbieweb
Asked:
newbieweb
2 Solutions
 
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
 
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
 
newbiewebAuthor Commented:
Thanks!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now