473,761 Members | 7,710 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Session State

Hi,

I understand that there are 3 modes in which I can
configure the SessionStateMod ule. What I need is an out of
process Session State store with fail over support.
The "SQL Server Mode" seems to be it, but I heard there is
quite a bit of degradation in performance for using this
mode. My next option is the "State Server Mode". However,
this mode does not give me the fail over support. Is there
anything that I can do the enhance the "State Server Mode"
to provide fail over support, such as dedicating 2 Session
State servers instead of 1, and adding the hooks to
replicate the session states from one server to the next?

Thanks in advance for your help.
--Nhi Lam

Nov 17 '05 #1
3 6034
Hi Yan-Hong Huang,

Thanks for the response. I can't use the "SQL Server Mode"
because of performance reasons. So my only option is
the "Out of Process mode". However, I am concerned that
when the computer that hosts the stateserver service
crashes, then all of our users will lose their sessions.
What I'd like to know is if there's a way to run 2
computers to host the stateserver service and have them
replicate the session states among themselves. In this
way, if one computer crashes, the other one can take over.

Thanks,
--Nhi Lam
-----Original Message-----
Hello Nhi,

From MSDN:
StateServer: Alternately, StateServer mode uses a stand- alone MicrosoftWindows service to store session variables. Because this service isindependent of Microsoft Internet Information Server (IIS), it can run on aseparate server. You can use this mode for a load- balancing solutionbecause multiple Web servers can share session variables. Although sessionvariables are not lost if you restart IIS, performance is impacted when youcross process boundaries.

So we could just use one stateserver service.

When we are considering these three types of ASP.NET session state modes,It's worth mentioning, briefly, some of the performance and reliabilityissue.

In process:
In process will perform best because the session state memory is keptwithin the ASP.NET process. For Web applications hosted on a single server,applications in which the user is guaranteed to be re- directed to thecorrect server, or when session state data is not critical (in the sensethat it can be re-constructed or re-populated), this is the mode to choose.
Out of process:
This mode is best used when performance is important but you can'tguarantee which server a user will request an application from. Without-of-process mode, you get the performance of reading from memory and thereliability of a separate process that manages the state for all servers.
SQL Server:
This mode is best used when the reliability of the data is fundamental tothe stability of the application, as the database can be clustered forfailure scenarios. The performance isn't as fast as out of process, but thetradeoff is the higher level of reliability.

Hope it helps.

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.Got .Net? http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: "Nhi Lam" <nh****@secretp lace.com>
!Sender: "Nhi Lam" <nh****@secretp lace.com>
!Subject: Session State
!Date: Tue, 24 Jun 2003 09:56:31 -0700
!Lines: 17
!Message-ID: <0f************ *************** *@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcM6cY+0trTuqTa yQ36G3C1UQ8lEpw ==
!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!Path: cpmsftngxa06.ph x.gbl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1545 39!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
!
!Hi,
!
!I understand that there are 3 modes in which I can
!configure the SessionStateMod ule. What I need is an out of!process Session State store with fail over support.
!The "SQL Server Mode" seems to be it, but I heard there is!quite a bit of degradation in performance for using this
!mode. My next option is the "State Server Mode". However,!this mode does not give me the fail over support. Is there!anything that I can do the enhance the "State Server Mode"!to provide fail over support, such as dedicating 2 Session!State servers instead of 1, and adding the hooks to
!replicate the session states from one server to the next?
!
!Thanks in advance for your help.
!--Nhi Lam
!
!

.

Nov 17 '05 #2
Hello Nhi,

I will send email to confirm if there is any way to do it. I will get back
here ASAP. Thanks.

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: "Nhi Lam" <nh****@secretp lace.com>
!Sender: "Nhi Lam" <nh****@secretp lace.com>
!References: <0f************ *************** *@phx.gbl>
<Sm************ **@cpmsftngxa06 .phx.gbl>
!Subject: RE: Session State
!Date: Wed, 25 Jun 2003 10:11:37 -0700
!Lines: 131
!Message-ID: <0d************ *************** *@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcM7PNZGkJX6wA7 rR3yThb0LtTTt5A ==
!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!Path: cpmsftngxa06.ph x.gbl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1548 52
!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
!
!Hi Yan-Hong Huang,
!
!Thanks for the response. I can't use the "SQL Server Mode"
!because of performance reasons. So my only option is
!the "Out of Process mode". However, I am concerned that
!when the computer that hosts the stateserver service
!crashes, then all of our users will lose their sessions.
!What I'd like to know is if there's a way to run 2
!computers to host the stateserver service and have them
!replicate the session states among themselves. In this
!way, if one computer crashes, the other one can take over.
!
!Thanks,
!--Nhi Lam
!
!>-----Original Message-----
!>Hello Nhi,
!>
!>From MSDN:
!>StateServer: Alternately, StateServer mode uses a stand-
!alone Microsoft
!>Windows service to store session variables. Because this
!service is
!>independent of Microsoft Internet Information Server
!(IIS), it can run on a
!>separate server. You can use this mode for a load-
!balancing solution
!>because multiple Web servers can share session variables.
!Although session
!>variables are not lost if you restart IIS, performance is
!impacted when you
!>cross process boundaries.
!>
!>So we could just use one stateserver service.
!>
!>When we are considering these three types of ASP.NET
!session state modes,
!>It's worth mentioning, briefly, some of the performance
!and reliability
!>issue.
!>
!>In process:
!>In process will perform best because the session state
!memory is kept
!>within the ASP.NET process. For Web applications hosted
!on a single server,
!>applications in which the user is guaranteed to be re-
!directed to the
!>correct server, or when session state data is not
!critical (in the sense
!>that it can be re-constructed or re-populated), this is
!the mode to choose.
!>
!>Out of process:
!>This mode is best used when performance is important but
!you can't
!>guarantee which server a user will request an application
!from. With
!>out-of-process mode, you get the performance of reading
!from memory and the
!>reliability of a separate process that manages the state
!for all servers.
!>
!>SQL Server:
!>This mode is best used when the reliability of the data
!is fundamental to
!>the stability of the application, as the database can be
!clustered for
!>failure scenarios. The performance isn't as fast as out
!of process, but the
!>tradeoff is the higher level of reliability.
!>
!>Hope it helps.
!>
!>Best regards,
!>yhhuang
!>VS.NET, Visual C++
!>Microsoft
!>
!>This posting is provided "AS IS" with no warranties, and
!confers no rights.
!>Got .Net? http://www.gotdotnet.com
!>--------------------
!>!Content-Class: urn:content-classes:message
!>!From: "Nhi Lam" <nh****@secretp lace.com>
!>!Sender: "Nhi Lam" <nh****@secretp lace.com>
!>!Subject: Session State
!>!Date: Tue, 24 Jun 2003 09:56:31 -0700
!>!Lines: 17
!>!Message-ID: <0f************ *************** *@phx.gbl>
!>!MIME-Version: 1.0
!>!Content-Type: text/plain;
!>! charset="iso-8859-1"
!>!Content-Transfer-Encoding: 7bit
!>!X-Newsreader: Microsoft CDO for Windows 2000
!>!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!>!Thread-Index: AcM6cY+0trTuqTa yQ36G3C1UQ8lEpw ==
!>!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!>!Path: cpmsftngxa06.ph x.gbl
!>!Xref: cpmsftngxa06.ph x.gbl
!microsoft.publ ic.dotnet.frame work.aspnet:154 539
!>!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!>!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
!>!
!>!Hi,
!>!
!>!I understand that there are 3 modes in which I can
!>!configure the SessionStateMod ule. What I need is an out
!of
!>!process Session State store with fail over support.
!>!The "SQL Server Mode" seems to be it, but I heard there
!is
!>!quite a bit of degradation in performance for using this
!>!mode. My next option is the "State Server Mode".
!However,
!>!this mode does not give me the fail over support. Is
!there
!>!anything that I can do the enhance the "State Server
!Mode"
!>!to provide fail over support, such as dedicating 2
!Session
!>!State servers instead of 1, and adding the hooks to
!>!replicate the session states from one server to the next?
!>!
!>!Thanks in advance for your help.
!>!--Nhi Lam
!>!
!>!
!>
!>.
!>
!

Nov 17 '05 #3
Hello Nhi,

It¡¯s impossible to have two stateserver services running for state
management. If rebustness is really a concern, we could only use SQL
Server with clustering.

For details, see this FAQ:
http://www.asp.net/Forums/ShowPost.a...=1&PostID=7504

Hope it helps.

Best regards,
yhhuang
VS.NET, Visual C++
Microsoft

This posting is provided "AS IS" with no warranties, and confers no rights.
Got .Net? http://www.gotdotnet.com
--------------------
!Content-Class: urn:content-classes:message
!From: "Nhi Lam" <nh****@secretp lace.com>
!Sender: "Nhi Lam" <nh****@secretp lace.com>
!References: <0f************ *************** *@phx.gbl>
<Sm************ **@cpmsftngxa06 .phx.gbl>
!Subject: RE: Session State
!Date: Wed, 25 Jun 2003 10:11:37 -0700
!Lines: 131
!Message-ID: <0d************ *************** *@phx.gbl>
!MIME-Version: 1.0
!Content-Type: text/plain;
! charset="iso-8859-1"
!Content-Transfer-Encoding: 7bit
!X-Newsreader: Microsoft CDO for Windows 2000
!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!Thread-Index: AcM7PNZGkJX6wA7 rR3yThb0LtTTt5A ==
!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!Path: cpmsftngxa06.ph x.gbl
!Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.dotnet.framew ork.aspnet:1548 52
!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
!
!Hi Yan-Hong Huang,
!
!Thanks for the response. I can't use the "SQL Server Mode"
!because of performance reasons. So my only option is
!the "Out of Process mode". However, I am concerned that
!when the computer that hosts the stateserver service
!crashes, then all of our users will lose their sessions.
!What I'd like to know is if there's a way to run 2
!computers to host the stateserver service and have them
!replicate the session states among themselves. In this
!way, if one computer crashes, the other one can take over.
!
!Thanks,
!--Nhi Lam
!
!>-----Original Message-----
!>Hello Nhi,
!>
!>From MSDN:
!>StateServer: Alternately, StateServer mode uses a stand-
!alone Microsoft
!>Windows service to store session variables. Because this
!service is
!>independent of Microsoft Internet Information Server
!(IIS), it can run on a
!>separate server. You can use this mode for a load-
!balancing solution
!>because multiple Web servers can share session variables.
!Although session
!>variables are not lost if you restart IIS, performance is
!impacted when you
!>cross process boundaries.
!>
!>So we could just use one stateserver service.
!>
!>When we are considering these three types of ASP.NET
!session state modes,
!>It's worth mentioning, briefly, some of the performance
!and reliability
!>issue.
!>
!>In process:
!>In process will perform best because the session state
!memory is kept
!>within the ASP.NET process. For Web applications hosted
!on a single server,
!>applications in which the user is guaranteed to be re-
!directed to the
!>correct server, or when session state data is not
!critical (in the sense
!>that it can be re-constructed or re-populated), this is
!the mode to choose.
!>
!>Out of process:
!>This mode is best used when performance is important but
!you can't
!>guarantee which server a user will request an application
!from. With
!>out-of-process mode, you get the performance of reading
!from memory and the
!>reliability of a separate process that manages the state
!for all servers.
!>
!>SQL Server:
!>This mode is best used when the reliability of the data
!is fundamental to
!>the stability of the application, as the database can be
!clustered for
!>failure scenarios. The performance isn't as fast as out
!of process, but the
!>tradeoff is the higher level of reliability.
!>
!>Hope it helps.
!>
!>Best regards,
!>yhhuang
!>VS.NET, Visual C++
!>Microsoft
!>
!>This posting is provided "AS IS" with no warranties, and
!confers no rights.
!>Got .Net? http://www.gotdotnet.com
!>--------------------
!>!Content-Class: urn:content-classes:message
!>!From: "Nhi Lam" <nh****@secretp lace.com>
!>!Sender: "Nhi Lam" <nh****@secretp lace.com>
!>!Subject: Session State
!>!Date: Tue, 24 Jun 2003 09:56:31 -0700
!>!Lines: 17
!>!Message-ID: <0f************ *************** *@phx.gbl>
!>!MIME-Version: 1.0
!>!Content-Type: text/plain;
!>! charset="iso-8859-1"
!>!Content-Transfer-Encoding: 7bit
!>!X-Newsreader: Microsoft CDO for Windows 2000
!>!X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
!>!Thread-Index: AcM6cY+0trTuqTa yQ36G3C1UQ8lEpw ==
!>!Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
!>!Path: cpmsftngxa06.ph x.gbl
!>!Xref: cpmsftngxa06.ph x.gbl
!microsoft.publ ic.dotnet.frame work.aspnet:154 539
!>!NNTP-Posting-Host: TK2MSFTNGXA14 10.40.1.166
!>!X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
!>!
!>!Hi,
!>!
!>!I understand that there are 3 modes in which I can
!>!configure the SessionStateMod ule. What I need is an out
!of
!>!process Session State store with fail over support.
!>!The "SQL Server Mode" seems to be it, but I heard there
!is
!>!quite a bit of degradation in performance for using this
!>!mode. My next option is the "State Server Mode".
!However,
!>!this mode does not give me the fail over support. Is
!there
!>!anything that I can do the enhance the "State Server
!Mode"
!>!to provide fail over support, such as dedicating 2
!Session
!>!State servers instead of 1, and adding the hooks to
!>!replicate the session states from one server to the next?
!>!
!>!Thanks in advance for your help.
!>!--Nhi Lam
!>!
!>!
!>
!>.
!>
!

Nov 17 '05 #4

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

Similar topics

5
3653
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of these menus are then placed into the page by calling Server.Execute(rs_Modules("ModulePath")). This works fine for up to 15 "menus" After that, the session variables that were set (not including those called by Global.ASA) are no longer set. ...
2
2185
by: John A Grandy | last post by:
for high traffic public websites , what are the proven options for session-state storage & management ? is an out-of-process state-server generally preferred over a sql-server ? what are the relevant criteria ? is the primary criteria max expected total storage size (for all active sessions) versus max ram available on the state-server machine ? if ADO.NET objects (such as small DataTables) must be stored in session-state , is any...
1
2410
by: Johan Nedin | last post by:
Hello! I have a problem with SQLSession state on my ASP.NET pages. SQLSession state behaves very different from InProcess session state, which I think is very bad. I can understand some of the differences, e.g that every object you store in SQLSession state have to be serializable, but other differences are very unfortunate.
10
3514
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much more time I have on a session? If I do a refresh, does reset the session clock? Do you have have to go to another page to reset the session timeout or will a postback also do it? This is important as we have a few pages that a user
9
5314
by: McGeeky | last post by:
Is there a way to get a user control to remember its state across pages? I have a standard page layout I use with a header and footer as user controls. Each page uses the same layout by means of copy paste (I hear this will improve in ASP.Net 2 via master pages). When I navigate from one page to the next the header and footer user controls lose their state because they are effectively different instances of the user control. Is there...
5
548
by: Sean | last post by:
Problem with sessions I have created an application without concern for sessions. As it turns out I think that might be my undoing. What I have: I have an online quiz. I don’t need to know users or save any data. If the application crashes or user exits the program they should simply start again. Pretty basic. All interactions are stored in an array (not much going on to save to a
18
3445
by: BillE | last post by:
When a user opens a new IE browser window using File-New-Window the integrity of an application which relies on session state is COMPLETELY undermined. Anyone who overlooks the fact that File-New-Window creates an instance of IE in the same process with the same SessionID as the parent window is in big trouble. This fundamentally restricts the usefullness of using session state management. I probably missed it somewhere - can...
11
3658
by: Glenn | last post by:
Hi I've been experimenting with managing state using the Session object. I've created a simple WS with a couple of methods, one which sets a string value, another that retrieves it. Each method has the WebMethodAttribute.EnableSession set to true. When I run the test page the session is maintained. However, using a console application, in between setting the string value and attempting to
0
9531
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
10115
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9775
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8780
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
7332
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
6609
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
5229
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...
3
3456
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2752
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.