session state - SqlServer

Q

quique

Hi all,

I want to know the advantages and disadvantages of the
methods of maintain session state, obviously if i choose
sqlserver is the most robust but the less performace..

If wan't to maintain session state in sqlserver, Does
anybody knows when it's saved to database?, on
beguinSession, on endSession...
<sessionState
mode="SQLServer"
stateConnectionString="tcpip=127.0.0.1:500"
sqlConnectionString="data
source=127.0.0.1;user id=sa;password="
cookieless="false"
timeout="20"
/>

If i want to mantain session state in ServerState (it
maintains in memory) if the machine that is listening
fails (in the example below is listening in the port
500), can i access to session state ??
<sessionState
mode="StateServer"
stateConnectionString="tcpip=127.0.0.1:500"
sqlConnectionString="data
source=127.0.0.1;user id=sa;password="
cookieless="false"
timeout="20"
/>
Any ideas apreciated
Thanks
 
C

Cowboy \(Gregory A. Beamer\)

I will answer the broader question first. If you have a session server set
up (SQL Server or ASP.NET Session server) and that machine fails, the
session is gone. I am not sure if there is any backup mechanism (doubt it,
as it is a 1.0 release, but it is possible), but the session you are in when
it fails is gone. This makes SQL Server a potentially better option, as it
is clusterable (of course, there are third party tools to virtualize
anything). If you want to make sure session cannot be trumped, you will need
to look into a high availability solution.

With SQL Server, the initial session call starts saving session. As you add
items, they are updated in the session tables. I am not sure of the "out"
mechanism, whether session end dumps the session value, or it works on a
time basis, but sessions are cleared some time after they end. (I have not
been curious enough to check the exact timing of everything).

The perf cost of SQL Server state is not that much higher, so I would not
worry as much, as long as the SQL server sits on the same backbone (network
core) as the potential state server.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top