473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

session state - SqlServer

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
Nov 17 '05 #1
1 2446
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!
************************************************** ********************
"quique" <es******@hotmail.com> wrote in message
news:0e****************************@phx.gbl...
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

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: John Q. Smith | last post by:
I'm trying to find out some of the details behind OOP state management with SQL Server. For instance - how long does the session object live on any server? Is it created and destoyed with each...
1
by: Julie Barnet | last post by:
Hi, I am having a problem with my session state through sql server. This used to work, then all of a sudden (the only change was setting up replication in the sqlserver database) it stopped...
8
by: karahan celikel | last post by:
I realized that when SqlServer mode is used for session management Session_End event is not fired in global.asax. What can I do if I want to do something when a user's session end? Thanks
31
by: Harry Simpson | last post by:
I've come from the old ASP camp where session variables were not used. When i started using ASP.NET in 2001, I started using them again because it was ok from what I'd read. I've been merrily...
5
by: sdettmers | last post by:
Hi, Database: SQL Server Session: SQL Server Language: C# Application: ASP.Net I have created a login page which attempts to retrieve the users record from the database and I...
2
by: Dave | last post by:
I have an application running on a 3 server webfarm running Windows 2003 with SQLServer Session state. After running for several hours, I started getting the following error. When I access each...
4
by: John Allberg | last post by:
Hi! We have a problem which is correlated to web farms and session handling and are thinking of what solution to choose. Our setup is with a web farm, one ldap server and a database cluster. ...
4
by: Abi | last post by:
We able to generate this error in our test environment and were able to research this enough to understand that the issue is NOT with an abject that needs to be serialized but rather as the stack...
3
by: Moe Sisko | last post by:
Using dotnet 2.0 sp1, I've got ASP.NET session state working ok in SQLServer mode, but the sessions never seem to expire. e.g if I add a timeout attribute like so : <sessionState...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.