473,748 Members | 10,771 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 "
stateConnection String="tcpip=1 27.0.0.1:500"
sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= "
cookieless="fal se"
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="StateServ er"
stateConnection String="tcpip=1 27.0.0.1:500"
sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= "
cookieless="fal se"
timeout="20"
/>
Any ideas apreciated
Thanks
Nov 17 '05 #1
1 2461
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******@hotma il.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 "
stateConnection String="tcpip=1 27.0.0.1:500"
sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= "
cookieless="fal se"
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="StateServ er"
stateConnection String="tcpip=1 27.0.0.1:500"
sqlConnectionSt ring="data
source=127.0.0. 1;user id=sa;password= "
cookieless="fal se"
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
4006
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 page request? - will each reading of a session variable cause a round trip to the DB server? or does the complete session live within the HttpContext object? - when asp.net session state is enabled (in any mode), after a session has been created,...
1
2689
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 working. I ran uninstallsqlstate.sql after stopping w3svc and then restarted the w3svc and rean installsqlstate.sql. This works fine on my machine and my session variables work again....but I'm an administrator on the database. I go to another...
8
8414
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
6999
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 using Session variables for three years now and i'm entering a project with my new boss who has never quite come around that session variables are ok. What's the concensus here. How can i convince him that they are ok in ASP.NET. OR
5
5694
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 store the validated users DataRow into Session which is in SQLServer. I have listed the error below for you to
2
2038
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 app individually, only one of the servers seems to return this error when I step through a sequence. I was told that I'm trying to store an object not marked as Serializable but I've tested this on a dev machine storing session variables without...
4
2201
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. The web farm is doing searches which are quite performance expensive against the ldap server, taking up to 10 or 15 seconds. The searches are displayed to the client in a datagrid, which then may have to be paged.
4
9576
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 trace suggests that the server (in the web farm) ran out of memory while attempting to stream data to an ASP Session State database (SQL Server 2000) . Our test environment consists of: - 3 web servers Load Balanced - SQL Server 2000 Database...
3
3459
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 mode="SQLServer" sqlConnectionString="Integrated Security=SSPI;data source=localhost" timeout="1" >
0
8989
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8828
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
9319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8241
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6795
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6073
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4599
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3309
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.