Form Authentication Doubt

S

SMG

Hi All,
It might be a silly doubt, but it is a doubt....

I am using form authentication for my website, now my web application is
gonna be deployed on two web servers with Load Balancing software in place.

Now if I login at one place, can I be treated as logged in at other place
also or it will again give me a login screen.

Form Authentication : Is it internally uses cookies?

Regards,
Shailesh Gajare
 
J

Jeppe Jespersen

Now if I login at one place, can I be treated as logged in at other place
also or it will again give me a login screen.

This is just a guess, but if you store your logged in user in session state,
and have both websites use a dedicated stateserver (or stateservice on
either machine), I would think that user info should be available.

At least "state service" is the first thing that popped into mind when I saw
the words "two web servers" and "load balancing".

Again, I may be off by a bit, here. :)

Jeppe Jespersen
Denmark
 
M

Manohar Kamath

If you are load balanced (as in a web farm), you can make use of the forms
authentication without any problems. However, there is ONE thing you need to
configure:

Forms authentication uses the "machine key" to encrypt/decrypt tickets, so
that the cookies can not be faked. In a web farm, each machine/application
might have a different machine key, and this will cause problems
re-authenticating the user. To get around this, make sure all the machine
keys are the same. The following articles might help:

http://support.microsoft.com/kb/313091/EN-US/

http://msdn.microsoft.com/library/d...n-us/cpgenref/html/gngrfmachinekeysection.asp

Also, if you are using sessions in your web farm, make sure you use SQL
server mode for session storage.

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp12282000.asp
 

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,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top