Wednesday 28 December 2011

Session Objects in ASP.NET

The ASP.NET session state identifies requests from the same browser during a limited time window as a session, and provides a way to persist variable values for the duration of that session. So, by default the ASP.NET session state is enabled for all ASP.NET applications.

In this article, we will share and explain about the Session objects in ASP.NET.

In classic ASP, the Session object was held in process to the IIS process and therefore any crash to the IIS or apps domain being reset will cause the whole Session object being reset. Hence, this will make the Session objects not reliable at all and cannot be used to store important data especially if your e-commerce type of website.

There are 3 types of storage providers for ASP.NET:

1. In Process Session State store (Stores sessions in ASP.NET memory cache--> Used in Classic ASP)
2. State Server Session State Store (Stores sessions in the ASP.NET State Server service)
3. Sql Session State Store (Stores sessions in Microsoft SQL Server Database and is configured with aspnet_regsql.exe)

At SPEC INDIA, our trained team of ASP.NET developers are eager to make very smart and secure use of Session objects declaration to make the effective and structured source code. If you have any requirement or queries, feel free to drop an email at our id lead@spec-india.com, we will be happy to assist you.


No comments:

Post a Comment