Asp.Net在4.0和2.0应用程序之间形成身份验证SSO [英] Asp.Net Forms Authentication SSO between 4.0 and 2.0 applications

查看:78
本文介绍了Asp.Net在4.0和2.0应用程序之间形成身份验证SSO的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

4.0框架应用程序和2.0框架应用程序之间的Sigle-Sign-On似乎已损坏.

Sigle-Sign-On between a 4.0 framework application and a 2.0 framework application seems to be broken.

我有一个基于asp.net framework 2.0的旧应用程序和一个基于asp.net framework 4.0的新应用程序,我正在尝试在两者之间配置SSO.

I have an old application built on asp.net framework 2.0 and a new application built on asp.net framework 4.0 and I am attempting configure SSO between the two.

我已经进行了所有正确的配置,以使用相同的validationKey,decryptionKey,validation和解密属性以及相同的身份验证名称,域,保护和路径属性来设置同一台机器密钥.

I have done all the proper configruation of setting up the same machine key with identical validationKey, decryptionKey, validation, and decryption attributes as well as identical authentication name, domain, protection, and path attributes.

奇怪的是,此配置在我的本地开发计算机上运行良好:-Windows 7 Ultimate(Service Pack 1)-将在应用程序池中运行的2.0应用程序设置为v2.0 Integrated-将设置为v4.0集成的应用程序池中运行的4.0应用程序

Strangely, this configuration works fine on my local development machine: - Windows 7 Ultimate (Service Pack 1) - 2.0 app running in app pool set to v2.0 Integrated - 4.0 app running in app pool set to v4.0 Integrated

但是,在部署服务器Windows事件日志中,我收到请求的表单身份验证失败.原因:提供的票证无效.":-Windows Server 2008 R2标准版(Service Pack 1)-将在应用程序池中运行的2.0应用程序设置为v2.0 Integrated-将设置为v4.0集成的应用程序池中运行的4.0应用程序

However, in the deployment server windows event log, I get "Forms authentication failed for the request. Reason: The ticket supplied was invalid.": - Windows Server 2008 R2 Standard (Service Pack 1) - 2.0 app running in app pool set to v2.0 Integrated - 4.0 app running in app pool set to v4.0 Integrated

我已经检查,重新检查并重新检查了部署机器上的机器密钥和身份验证配置,因此我确定这不是问题.

I have checked, re-checked, and re-re-checked the machine key and authentication configuration on the deployment machine so I know for sure that this is not the issue.

此外,仅出于争论的目的,在部署服务器上,我什至尝试设置两个应用程序 forms protection ="None" 只是为了查看是否是加密问题,而结果仍然是一样.

Also, just for the sake of argument, on the deployment server, I even tried setting both applictions forms protection="None" just to see if encryption was the issue and the result is still the same.

此外,在部署服务器上,配置了相同SSO设置的所有其他v2.0应用程序也没有问题.甚至那些运行在不同应用程序池中的应用程序.简而言之,从v2.0到v2.0,而从v4.0到v2.0则有效.

Also, on the deployment server, all other v2.0 applications configured with the same SSO settings have no issue. Even those running in different application pools. In short, v2.0 to v2.0 works while v4.0 to v2.0 pukes.

有什么建议吗?

推荐答案

经过几天的绝望,它起作用了:在4.0 web.config配置标记中

After several days of desperation this worked: in the 4.0 web.config configuration tag

<appSettings>
    <add key="aspnet:UseLegacyFormsAuthenticationTicketCompatibility" value="true" />
    <add key="aspnet:UseLegacyEncryption" value="true" />
    <add key="aspnet:UseLegacyMachineKeyEncryption" value="true" />
</appSettings>

这篇关于Asp.Net在4.0和2.0应用程序之间形成身份验证SSO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆