不同网络中不同服务器中的 ASP.NET Forms 身份验证问题
我有两个具有单个域名的应用程序(www.domain.com
和 test.domain.com
)。 第一个是在 .NET 2 中开发的,另一个是在 .NET 4 中开发的。
我已按照以下步骤配置了 Web.Config
:
- 我为它们设置了相同的计算机密钥。
- 我已经设置了cookie名称。
- 我已将域名设置为“domain.com”。
- 另外,我已将硬编码 cookie 域名设置为“domain.com”。
当它们都在单个 Web 服务器上运行时,一切都工作正常。最近,我被要求将 test.domain.com
移动到另一台服务器。移动后,身份验证票证在第二台服务器上无效。
我再次在一台服务器上测试了它们,一切正常,但在两台服务器中用户无法访问 test.domain.com
。 (身份验证票证无效)
编辑:
第二个服务器是虚拟(VMWare)服务器。我在物理服务器上没有任何问题。
我检查了服务器的时间是同步的。我还使用 Fiddler 来查看服务器是否未获取身份验证票证,并将其票证发送到第二台服务器。
注意:服务器位于不同的网络中,可能是代理或防火墙导致了这种情况(我不知道)
我错过了什么吗?
I have two applications with a single domain name (www.domain.com
and test.domain.com
).
First one has been developed in .NET 2 and the other one with .NET 4.
I have configured Web.Config
as these steps:
- I've set the same machine key for both of them.
- I've set the cookie name.
- I've set the domain name to "domain.com".
- Also, I've set hard-coded cookie domain name to "domain.com" .
Everything was working fine when both of them were running on a single web server. Recently, I've been asked to move test.domain.com
to another server. After moving, authentication ticket is not valid on the second server.
I tested both of them on a single server again and everything was working fine, but in two servers users can't access to test.domain.com
. (Authentication Ticket is invalid)
Edited:
The second server is a virtual (VMWare) server. I don't have any problem in physical servers.
I checked the server's time to be synchronized. I also used Fiddler to see if the server does not get the auth ticket and their ticket is sent to the 2nd server.
Note: Servers are located in different networks and maybe proxy or firewall causes this (I've no idea)
Is there anything I missed?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后我在这里找到了它:
http://weblogs.asp.net/scottgu/archive/2010/09/28/asp-net-security-update-now-available.aspx
安装后其中一台服务器未更新补丁问题解决了!
Finally I've found it here:
http://weblogs.asp.net/scottgu/archive/2010/09/28/asp-net-security-update-now-available.aspx
One of ther server was not update, after installing the patch the issue solved!