first_page the funky knowledge base
personal notes from way, _way_ back and maybe today

ASP.NET: Flippant Remarks about SQL Server Session State

This is a sessionState element configured for SQL Server Session State:

<sessionState
    cookieless="true"
    mode="SQLServer"
    sqlConnectionString="Data Source=MyDBServer;Integrated Security=SSPI"
    timeout="20" />

In order for the server MyDBServer to be ready for this configuration, the InstallSqlState.sql script needs to run. This script creates a dependency on tempdb in SQL Server 2000 and permissions need to be set for ASPNET. And some of us may forget that tempdb is cleared and recreated every time SQL Server starts. This can be a management irritant for developers. It should not be a problem for operations staff supporting servers with large uptimes.

SQL Server Session state can only persist objects that can be serialized. One way to get around this limitation is to load an array of the non-serializeable objects into Application memory and store index references to them in Session State.

SQL Server Session state is more reliable but is not as fast as the alternatives.

mod date: 2005-08-22T20:01:19.000Z