ASP.NET forms authentication on load balanced servers

Are there any possible problems with using standard forms authentication (see below) on load balanced servers? If possible, what can I do to prevent problems.

<authentication mode="Forms"> <forms loginUrl="~/Login/" protection="All" timeout="30" /> </authentication> 

Can cookies be used (used by default)? Should I go without cookies? etc...

Also, does Microsoft (or VMWare) have a VirtualPC download, which is an instant load-balanced test environment?

+6
forms-authentication load-balancing
source share
1 answer

There is one problem. Cookies are encrypted and verified using a machine key and a verification key (which means protection = "All" ). You will need to set those located at your top level web.config on all servers, otherwise each of them will have a different one and will reject cookies set by others.

Here you can find the machine generator generator here . Then put the created xml inside in the web.config of all the servers, and you are ready to download.

+12
source share

All Articles