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

auth cookie/load balancing issue

Hi all, we are experiencing an issue with regards to the auth cookie and a
load balanced server farm. The user may randomly hit any box in the server
farm. If the users authenticates against 1 box but were to hit another, he
is logged out of the session. We are NOT using session state and just using
the forms based authentication via cookies. Any idea why this is happening?
I thought a cookie was good for a domain regardless of the server. The
servers are running server 2003 web with .net 1.1 sp1

TIA!
Nov 18 '05 #1
5 2402
Thats what is webfarm scenario. You can -
store the sessionID for that user in cache and retrieve it next time.
(this wud work in any other situation other than a webfarm).
For webfarm, use cookies as the back up when cache fails.
NOW, when cookies are also diabled, you can force the user to have
cookies enabled in order for that section of the site to work, or send
the user to a default error page in case the cookies are disabled.
You can force a user to have cookies enabled by setting somethign
querystring variable and if its different send him to a default error
page..
In this way, the user persistence can be maintained.

"Param R." <pr@nospam.com> wrote in message news:<u4**************@TK2MSFTNGP12.phx.gbl>...
Hi all, we are experiencing an issue with regards to the auth cookie and a
load balanced server farm. The user may randomly hit any box in the server
farm. If the users authenticates against 1 box but were to hit another, he
is logged out of the session. We are NOT using session state and just using
the forms based authentication via cookies. Any idea why this is happening?
I thought a cookie was good for a domain regardless of the server. The
servers are running server 2003 web with .net 1.1 sp1

TIA!

Nov 18 '05 #2
HI,

Make sure that you use the same keys on all servers in the farm. You can
check the following links:

http://msdn.microsoft.com/library/de...us/cpgenref/ht
ml/gngrfMachineKeySection.asp
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconformsauthenticationacrossapplications.asp

Cosmin

"Param R." <pr@nospam.com> wrote in message
news:u4**************@TK2MSFTNGP12.phx.gbl...
Hi all, we are experiencing an issue with regards to the auth cookie and a
load balanced server farm. The user may randomly hit any box in the server
farm. If the users authenticates against 1 box but were to hit another, he
is logged out of the session. We are NOT using session state and just using the forms based authentication via cookies. Any idea why this is happening? I thought a cookie was good for a domain regardless of the server. The
servers are running server 2003 web with .net 1.1 sp1

TIA!

Nov 18 '05 #3
Azam, I am NOT using Session State and I am using cookies. It still kicks me
out. Any ideas?

"azam" <az**********@gmail.com> wrote in message
news:51**************************@posting.google.c om...
Thats what is webfarm scenario. You can -
store the sessionID for that user in cache and retrieve it next time.
(this wud work in any other situation other than a webfarm).
For webfarm, use cookies as the back up when cache fails.
NOW, when cookies are also diabled, you can force the user to have
cookies enabled in order for that section of the site to work, or send
the user to a default error page in case the cookies are disabled.
You can force a user to have cookies enabled by setting somethign
querystring variable and if its different send him to a default error
page..
In this way, the user persistence can be maintained.

"Param R." <pr@nospam.com> wrote in message
news:<u4**************@TK2MSFTNGP12.phx.gbl>...
Hi all, we are experiencing an issue with regards to the auth cookie and
a
load balanced server farm. The user may randomly hit any box in the
server
farm. If the users authenticates against 1 box but were to hit another,
he
is logged out of the session. We are NOT using session state and just
using
the forms based authentication via cookies. Any idea why this is
happening?
I thought a cookie was good for a domain regardless of the server. The
servers are running server 2003 web with .net 1.1 sp1

TIA!

Nov 18 '05 #4
Thanks a bunch! That did it.

"Cosmin Marin" <no****@nospam.ro> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
HI,

Make sure that you use the same keys on all servers in the farm. You can
check the following links:

http://msdn.microsoft.com/library/de...us/cpgenref/ht
ml/gngrfMachineKeySection.asp
http://msdn.microsoft.com/library/de...us/cpguide/htm
l/cpconformsauthenticationacrossapplications.asp

Cosmin

"Param R." <pr@nospam.com> wrote in message
news:u4**************@TK2MSFTNGP12.phx.gbl...
Hi all, we are experiencing an issue with regards to the auth cookie and
a
load balanced server farm. The user may randomly hit any box in the
server
farm. If the users authenticates against 1 box but were to hit another,
he
is logged out of the session. We are NOT using session state and just

using
the forms based authentication via cookies. Any idea why this is

happening?
I thought a cookie was good for a domain regardless of the server. The
servers are running server 2003 web with .net 1.1 sp1

TIA!


Nov 18 '05 #5
Set a property to add the HttpContext.Current.Session.SessionID to
cache and also set a cookie with this value and add it to the cookies
collection.

If the user still disbles the cookies on the browser, then you can
show a custom err message.


"Param R." <pr@nospam.com> wrote in message news:<OZ**************@TK2MSFTNGP15.phx.gbl>...
Azam, I am NOT using Session State and I am using cookies. It still kicks me
out. Any ideas?

Nov 18 '05 #6

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

Similar topics

4
by: jsWalter | last post by:
I have an extension Class to Auth and I'm looking for some folks to hammer on it a bit and give feed back. Class: AuthUser - add user (well, Auth does that now, so its gone) - remove user...
3
by: Dan Stromberg | last post by:
If I wanted to write a python script that performs basic auth, gets a cookie, and then does an http POST using the cookie for authentication, what would be the best python API to write to? Does...
2
by: yagish | last post by:
Hi Techies, Am really new with the Oracle 9i Forms and am searching for a way to perform Load Balancing in Oracle 9i Forms Application. Its not a J2EE application, so cannot go the OC4J way. I...
0
by: Chris | last post by:
Hi, I am using an authentication cookie (generated on page load) of my asp.net application. I'm giving the cookie a lifespan of 20 minutes. If a user does something within that 20 minutes, it...
2
by: Christopher D. Wiederspan | last post by:
I'm wondering if anybody could give me some tips on a good webfarm load-balancing solution for an ASP.NET application. Here's the rundown: we've got 3 identical servers that each have identical...
4
by: 23s | last post by:
I had this problem in the past, after a server reformat it went away, and now after another server reformat it's back again - no clue what's doing it. Here's the flow: Website root is public, no...
13
by: Perecli Manole | last post by:
In the forms authentication construct, I need a way to prevent ticket IssueDate and Expiration from being updated for a specific page only. By default forms authentication updates these two values...
2
by: achoo | last post by:
I have two versions of the same program that send requests to a Web service. One version is a Windows application written in C#, and it properly handles a cookie created by the Web service. All...
3
by: Erwin S. Andreasen | last post by:
Pickling a Cookie.SimpleCookie (or SmartCookie) when using protocol=2 seems to do something very strange. Protocol 0/1 work fine: $ python2.4 Python 2.4.2 (#2, Nov 20 2005, 17:04:48) on linux2...
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: 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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.