473,320 Members | 2,112 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,320 software developers and data experts.

Session variables and load balancing

Max
Frankly, i need session variables to persist regardless of load balancing.
My hoster says save them in files, yuk. Are there any other thoughts

The problem is that the session variables are lost when the load is switched
to another server. Also, i am locked out, because there is now a cookie on
my PC that will not expire until the timeout has expired?

Max
Jul 19 '05 #1
3 5275
Hi Max,

Thank you for using the community.

Regardng the question, you may refer to following article:

ASP and Web Session Management
http://msdn.microsoft.com/library/de...us/dnasp/html/
aspwsm.asp

The last two section of the article provide some useful suggestion to
handle session with load balancing.

Regarding the question about cookie, you can rewrite a cookie with same
name and different expired date.

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Jul 19 '05 #2
Max
thanx Luke,

This part
"When a user first comes to a Web application by clicking a hyperlink, or
typing a URL such as http://example.microsoft.com/Webapp/, a load balancer
routes the request to a specific machine in the Web farm. For example, the
load balancer selects a machine named w10.asite.com to handle this request.
ASP will create a new session for the request running on this specific
machine. In the Session_OnStart event, the ASP script can redirect the user,

<% Response.Redirect("http://w10.sample.com/Webapp/firstpage.asp"
%>
"I understand the logic of the above but how do i find the dns address of
the server. ie how do i know it is w10.asite.com?

I am researching Session_OnStart as quickly as i can. I guess i use the
Session_OnStart when the user logs on for example and whenever i refer to a
relative page it takes it from the original server until the session
ends/abandons?

thanx, i think i have more questions coming :o)



"[MSFT]" <lu******@online.microsoft.com> wrote in message
news:5#*************@cpmsftngxa06.phx.gbl...
Hi Max,

Thank you for using the community.

Regardng the question, you may refer to following article:

ASP and Web Session Management
http://msdn.microsoft.com/library/de...us/dnasp/html/ aspwsm.asp

The last two section of the article provide some useful suggestion to
handle session with load balancing.

Regarding the question about cookie, you can rewrite a cookie with same
name and different expired date.

Hope this help,

Luke
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Jul 19 '05 #3
Greetings Max:

On a different solution path, most load balancers have 'Sticky Sessions' (by some name), a process where subsequence request from the
same client route back to the same Web Server as the previous request. Is there a way your ISP can turn this on?

-rwg
This is what I think, not necessarily what is accurate!

--------------------
| From: "Max" <an**@nospam.com>
| Newsgroups: microsoft.public.inetserver.asp.general
| References: <40**********************@news.optusnet.com.au> <5#*************@cpmsftngxa06.phx.gbl>
| Subject: Re: Session variables and load balancing
| Date: Fri, 5 Mar 2004 20:03:41 +1000
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
| Lines: 59
| Message-ID: <40**********************@news.optusnet.com.au>
| NNTP-Posting-Host: 210.49.94.131
| X-Trace: 1078481053 4227 210.49.94.131
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed 00.sul.t-online.de!t-online.de!tiscali!newsfeed1.ip.tiscali.net!
216.196.98.140.MISMATCH!border1.nntp.ash.giganews. com!border2.nntp.sjc.giganews.com!nntp.giganews.co m!news1.optus.net.au!optus!
newsfeeder.syd.optusnet.com.au!news.optusnet.com.a u!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.inetserver.asp.general:267566
| X-Tomcat-NG: microsoft.public.inetserver.asp.general
|
| thanx Luke,
|
| This part
| "When a user first comes to a Web application by clicking a hyperlink, or
| typing a URL such as http://example.microsoft.com/Webapp/, a load balancer
| routes the request to a specific machine in the Web farm. For example, the
| load balancer selects a machine named w10.asite.com to handle this request.
| ASP will create a new session for the request running on this specific
| machine. In the Session_OnStart event, the ASP script can redirect the user,
|
| <% Response.Redirect("http://w10.sample.com/Webapp/firstpage.asp"
| %>
| "I understand the logic of the above but how do i find the dns address of
| the server. ie how do i know it is w10.asite.com?
|
| I am researching Session_OnStart as quickly as i can. I guess i use the
| Session_OnStart when the user logs on for example and whenever i refer to a
| relative page it takes it from the original server until the session
| ends/abandons?
|
| thanx, i think i have more questions coming :o)
|
|
|
|
|
|
|
| "[MSFT]" <lu******@online.microsoft.com> wrote in message
| news:5#*************@cpmsftngxa06.phx.gbl...
|
| > Hi Max,
| >
| > Thank you for using the community.
| >
| > Regardng the question, you may refer to following article:
| >
| > ASP and Web Session Management
| >
| http://msdn.microsoft.com/library/de...us/dnasp/html/
| > aspwsm.asp
| >
| > The last two section of the article provide some useful suggestion to
| > handle session with load balancing.
| >
| > Regarding the question about cookie, you can rewrite a cookie with same
| > name and different expired date.
| >
| > Hope this help,
| >
| > Luke
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
|
|
|
Jul 19 '05 #4

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

Similar topics

1
by: Jonathan Chong | last post by:
I have problem with AOL browser (IE and Netscape are OK) accessing my Web site after putting up a load balancer that will go to W1 or W2. The problem does not happen when there is only Web server...
3
by: Nhi Lam | last post by:
Hi, I understand that there are 3 modes in which I can configure the SessionStateModule. What I need is an out of process Session State store with fail over support. The "SQL Server Mode" seems...
4
by: DeeAnn | last post by:
We've encountered a "flaky" situation with a Session variable holding a data set on load balanced servers; server session with cookies is set up. Background: Session variable holds a dataset. ...
1
by: Robert | last post by:
In Web.config file is a setting for sessionState. If I want to maintain a users' session state (ie use the Session object) in a web farm that is being load balanced by a Cisco CSS 11501 Switch. ...
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...
6
by: Andrew Robinson | last post by:
I am running two servers with a hardware network load balancing device. I know that to share session information between the two servers I need to implement some type of SQL based session...
1
by: Vidyadhar Joshi | last post by:
I have the following scenario in a true load balanced environment (without sticky sessions): There are 2 ASPX pages. I want to pass an object from the first page to the second page. On the...
1
by: m.a | last post by:
Hello, I am looking for a hosting solution for my asp.net application. I found that some ISP stated that session states are not preserved in a load balancing system. As I know, if the asp.net is...
3
by: =?Utf-8?B?T3NjYXJBcmc=?= | last post by:
Hello I have an ASP.NET app (VS 2005) that requires users to login and then presents some private information to users. The user identity is kept after login by session variables. (cookies)...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.