ASP.NET窗体上的负载平衡服务器的验证 [英] ASP.NET Forms Authentication on Load Balanced Servers
问题描述
有没有使用负载平衡服务器上的默认窗体身份验证(见下文)的任何可能的问题是什么?如果有可能,我能做些什么,以prevent问题。
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.
<authentication mode="Forms">
<forms loginUrl="~/Login/" protection="All" timeout="30" />
</authentication>
我可以使用cookie(默认情况下使用)?我必须去无Cookie?等等...
Can I use cookies (used by default)? Do I have to go cookieless? etc...
此外,没有微软(或VMWare)有一个虚拟PC下载软件,瞬间负载平衡测试环境?
Also, does Microsoft (or VMWare) have a VirtualPC download that is an instant Load Balanced testing environment?
推荐答案
有一个问题。饼干被加密,并使用机键和确认键确认(这就是保护=全部的意思)。您必须设置那些顶层的web.config中的所有服务器,否则,他们每个人都会有不同的一个,将拒绝被别人设置的Cookie。
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.
您可以找到的machineKey发电机这里。然后把生成的XML内的所有服务器的web.config文件,你准备好摇滚。
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.
这篇关于ASP.NET窗体上的负载平衡服务器的验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!