Given the idea of a web application (.NET 3.5+)
- Browser
- web app
the authentication using forms will result in a similar line of code
FormsAuthentication.SetAuthCookie(strUsrNm, True)
this is fine in a non load balanced server instance. how does authentication work in a load balanced stuation (no sticky session/infinity), and you cannot store the client IP, users password or login in the browser.
- Browser
- Load balancer
- Web app (on server 1) || Web app (on server 2)
limitations: no database sessions, no AD server (for example: cater for external users)
in short - in a load balanced situation how does the appliation know who the user is if they authenticated against the other server without re-authenticating.
thanks
If you use cookies, all the servers will know about the authenticated user because the authentication ticket stored on a cookie. Any server will receive this cookie and will be able to decrypt the ticket and authenticate the user.
Here you have more details about how forms authentication works.
Also you have to be sure that all servers on the farm share the machine key used to encrypt and decrypt.
Here more details