ASP.NET Forms Authentication on Load Balanced Servers

后端 未结 1 1191
梦谈多话
梦谈多话 2021-01-01 00:45

Are there any possible issues with using the default Forms Authentication (see below) on Load Balanced servers? If there can be, what can I do to prevent the issues.

<
相关标签:
1条回答
  • 2021-01-01 01:26

    There is one issue. The cookies are encrypted and validated using the machine key and the validation key (that's what protection="All" means). You will have to set those in your top-level web.config in all the servers, otherwise each of them will have a different one and will reject cookies set by the others.

    You can find a machineKey generator here. Then put the generated xml inside in the web.config of all the servers and you're ready to rock.

    0 讨论(0)
提交回复
热议问题