auth cookie/load balancing issue

P

Param R.

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!
 
A

azam

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.
 
P

Param R.

Azam, I am NOT using Session State and I am using cookies. It still kicks me
out. Any ideas?
 
A

azam

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top