Session State in


Session State in

What is a Session?

A session is the duration of connectivity between a client and a server application. session state enables you to store and retrieve values for a user as the user navigates pages in a Web application. 
Related Articles

SessionState Mode in

There are different types of sessions state mode in such as In-Proc, State-Server, SQL Server. Let me describe in brief.
  • In-Proc - In this mode of session, state is stored in the memory space of the aspnet_wp.exe (worker process). This is the default setting. If the IIS reboots or web application restarts then session state is lost.
  • State-Server - In this mode of session, state is serialized and stored in a separate process (aspnet_state.exe), therefore, the state can be stored on a separate computer (a state server).
  • SQL Server - In this mode of session, state is serialized and stored in a SQL Server database.
Session state can be specified in <sessionState> element of application configuration file (web.config). Using state server and SQL Server session state can be shared across web forms but always remember this comes at speed cost as ASP.NET needs to serialize and deserialize data over network repeatedly.  

sessions, session variable, session id, web session, session, session state, mvc session, asp session session state
Does session use cookies?
Yes, session use cookies. The session id value is stored in the browser client temp directory. This id is used to get the session data from the server in every post back.

Is Session_End event supported in all session modes?
Session_End event occurs only in In-proc mode. State-Server and SQL Server do not have Session_End event.

How can we kill a user session?

What is a session Id?

A session id is 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.

I hope you will enjoy the interview tips while learning mvc session. I would like to have feedback from my blog readers. Your valuable feedback, question, or comments about this article are always welcome. Also If you like this article, don't forget to share this article with your friends and colleagues
Session State in Reviewed by Ravi Kumar on 9:13 AM Rating: 5


All Rights Reserved by Etechpulse © 2012 - 2017

Contact Form


Email *

Message *

Powered by Blogger.