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
|
| Author: Chetla Hari Kumar Reddy 12 Jul 2004 | Member Level: Bronze Points : 0 |
Keep it up, it's a better explanation for beginners.
|