简体   繁体   English

IIS6和IIS7服务器之间的表单身份验证

[英]Forms Authentication Between IIS6 and IIS7 Servers

I have two web servers on the same subnet, one a Windows Server 2003 with IIS6 and the other a Windows Server 2008 R2 with IIS7 (might be 7.5 I suppose). 我在同一子网上有两个Web服务器,一个是带有IIS6的Windows Server 2003,另一个是带有IIS7的Windows Server 2008 R2(我想可能是7.5)。

I want to provide a single sign on between both websites. 我想在两个网站之间提供一个单一的登录。 Both are ASP.NET 2.0 hosted sites and the machine keys match on both machines in the web.config file. 两者都是ASP.NET 2.0托管站点,并且机器密钥在web.config文件中的两台机器上都匹配。 Also, my authentication attributes also match. 另外,我的身份验证属性也匹配。

When I log into the first server (IIS6) and try to connect to a page on the second server (IIS7) using an IFrame, the IFrame page is being redirected to the login page. 当我登录到第一台服务器(IIS6)并尝试使用IFrame连接到第二台服务器(IIS7)上的页面时,该IFrame页面将被重定向到登录页面。

I have verified that the forms authentication cookie is being created and the "domain" setting are the same in both web.config files. 我已验证正在创建表单身份验证cookie,并且两个web.config文件中的“域”设置都相同。

I have the application pool on the IIS7 server running under "classic" mode, but that has made no difference. 我在IIS7服务器上的应用程序池以“经典”模式运行,但这没有什么区别。

Any ideas? 有任何想法吗? Is this even possible? 这有可能吗?

You need to make sure that the machine key (used to encrypt the forms authentication token) is the same on both machines: 您需要确保两台机器上的机器密钥(用于加密表单身份验证令牌)相同:

http://blogs.msdn.com/b/tess/archive/2009/09/16/forms-authentication-fails-after-installing-iis-7-5.aspx http://blogs.msdn.com/b/tess/archive/2009/09/16/forms-authentication-fails-after-installing-iis-7-5.aspx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM