具有 1 个数据库和多个 Web 服务器的 ASP.Net 会员提供商
我很快就会启动一个 mvc3 项目。该项目将在多个服务器上运行,所有服务器都指向同一数据库。该项目使用 ASP.Net 的会员资格提供程序。我需要确保在服务器 1 上创建的用户能够登录服务器 2。
问题:会员资格提供商使用的自动生成的加密/解密密钥是否会出现任何问题?
I will be launching an mvc3 project soon. The project will be run on multiple servers which all point to the same database. The project uses ASP.Net's membership provider. I need to ensure that a user created on Server 1 will be able to login to Server 2.
Question: Will there be any issues with automatically generated enryption/decryption keys that the membership provider uses?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我们使用
MembershipProvider
(我们派生了我们自己的版本)来实现负载平衡应用程序,而且我没有遇到任何问题。至于默认的
SqlMembershipProvider
,如果您对密码进行哈希处理或以明文形式存储它们,应该没问题。如果您要加密它们,只需确保您的 Web 服务器在 machine.config 的
配置部分中具有相同的密钥值即可。有关详细信息,请参阅这篇文章。We use the
MembershipProvider
(we derive our own version of it) for a load-balanced application and I haven't had an issue with it.As for the default
SqlMembershipProvider
, if you're either hashing your passwords or storing them in clear text, you should be fine. If you're encrypting them, just make sure that your web servers all have the same key values in the machine.config's<machineKey>
configuration section. See this article for more information.如何仅创建一个 Active Directory 角色,然后授予该角色对网站的访问权限?在 web.config 文件中嵌入数据库的代理用户名和密码。 web.config 文件对任何用户都不可见,并且可以加密。
How about just creating an active directory role and then give the role access to the web site. Embed a proxy username and password for the database in the web.config file. The web.config file is not visible to any users and it can be encrypted.