C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » ASP.NET/Web Applications »

Various session storage facilities in ASP.NET and performance implications


Posted Date: 19 Jun 2004    Resource Type: Articles    Category: ASP.NET/Web Applications
Author: Hema KumarMember Level: Silver    
Rating: 1 out of 5Points: 7



To explain this in brief let me re-iterate over the fact that ASP.Net provides 3 different kinds of session storage facilities available namely “InProc”, “StateServer” and “SQLServer”. So you can have your session data stored at any of these three different locations.

1. In Process (In Process by default) – This is the default option by which the session values are kept alive as objects in Windows Server, by ASP.Net worker process.

2. State Server (Out of Process) – aspnet_state.exe runs as a separate process on the same box or on another machine. In this case the session values are serialized and stored in the memory of this separate process.

3. SQL Server – As the name suggests in this case the session values are stored in the SQL Server table. Again in this case the SQL server can be on the same box as well can be a dedicated DB server.

The mode in the above case can have four different values representing different locations of storage discussed above.

• Off – Indicating application wide session state is not enabled. If your application is not going to use any session information remember to set the mode to “Off

• InProc – This is the default option

• StateServer – If you set this as mode then providing stateConnectionString parameter is important. 127.0.0.1 indicate local host, you may provide any server name, and 42424 is the default port number, providing it is mandatory. Also note that state service, process named - aspnet_state.exe, is installed but is stopped by default, so you may need to start that on the server before use.)

• SQLServer – If you set this as mode then providing sqlConnectionString parameter is important ASP.Net uses default Databases and Initial Catalog so providing such arguments in the connection string is not allowed.
The timeout parameter indicates the time in minutes after which, an idle user session should be abandoned.

if we rate these modes according to performance then the ranks would be

1.InProc
2. StateServer
3. SQLServer

But if we rate the same from reliability perspective then the ranks would be

1. SQLServer
2. StateServer
3. InProc



Responses

Author: Chetla Hari Kumar Reddy    12 Jul 2004Member Level: Bronze   Points : 0
Keep it up, it's a better explanation for beginners.


Feedbacks      
Popular Tags   What are tags ?   Search Tags  
Sign In to add tags.
(No tags found.)

Post Feedback


This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must Sign In to post a response.
Next Resource: How to allow downloading of files without exposing the URL
Previous Resource: Storing Images into Database with ASP.NET
Return to Discussion Resource Index
Post New Resource
Category: ASP.NET/Web Applications


Post resources and earn money!
 
More Resources



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use