Session, SessionId and Session State in ASP.NET

Define Session, SessionId and Session State in ASP.NET.

Session:

- It is the duration of connectivity between a client and a server application.
- Session variables are stored in a SessionStateITemCollection object that is exposed through the HttpContext.Session property.
- It is indexed by the name of the variable or by an integer index.
- The session variables are created by referring to the session variable by name.

SessionId:

- Seesion identifires are used to identify request from the browser.
- By default, value of SessionId is stored in a cookie.
- You can configure the application to store SessionId in the URL for a "cookieless" session.
- It considered active as long as requests continue to be made with the same SessionID value.

Session state:

- It is used to store and retrieve values for a user.
- It enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a web application.
- It identifies requests from the same browser during a limited time window as a session.
- It provides a way to persist variable values for the duration of that session.
ASP.NET Session Identifier
ASP.NET - What is Session Identifier? - Session Identifier is used to identify session. It has SessionID property....
Advantages and disadvantages of using Session State Management - ASP.NET
ASP.NET - Advantages and disadvantages of using Session State Management - The advantages of using session state are as follows: It is easy to implement..
ASP.NET Session State Modes
ASP.NET Session State Modes - InProc Mode: This mode stores the session data in the ASP.NET worker process....
Post your comment