469,949 Members | 2,190 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,949 developers. It's quick & easy.

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 2266
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by jsWalter | last post: by
3 posts views Thread by Dan Stromberg | last post: by
reply views Thread by Chris | last post: by
2 posts views Thread by Christopher D. Wiederspan | last post: by
13 posts views Thread by Perecli Manole | last post: by
3 posts views Thread by Erwin S. Andreasen | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.