单点登录与窗体身份验证 [英] Single Sign On with Forms Authentication
问题描述
我试图建立单一登录2网站驻留在同一个域
I am trying to set up Single sign on for 2 websites that reside on the same domain
例如
的http:// mydomain的(包含表单的身份验证登录页面顶级网站)
http://mydomain (top level site that contains a forms-auth login page)
的http:// MYDOMAIN /管理(单独开发的网站居住在父网站内的虚拟应用程序)
http://mydomain/admin (seperately developed website residing in a Virtual Application within the parent website)
读了有关对单点登录的几篇文章
例如。
Have read a few articles on Single Sign on e.g.
<一个href=\"http://www.$c$cproject.com/KB/aspnet/SingleSignon.aspx\">http://www.$c$cproject.com/KB/aspnet/SingleSignon.aspx
<一个href=\"http://msdn.microsoft.com/en-us/library/dd577079.aspx\">http://msdn.microsoft.com/en-us/library/dd577079.aspx
他们似乎认为这只是其在每个web.config中的相同的machineKey部分的情况下,使该Cookie加密和解密是为每个应用程序
And they seem to suggest it is just a case of having the same machinekey section in each web.config so that the cookie encryption and decryption is the same for each application
我已经设置,我永远不会提示您在子网站的凭据(虚拟应用程序)
I have set this up and I never get prompted for credentials in the sub-website (the virtual application)
我总是提示父站点。
除了具有相同的machineKey我也尝试添加相同&LT;认证&GT;
和&LT;授权&GT;
元素
In addition to having the same machinekey I've also tried adding the same <authentication>
and <authorisation>
elements
任何想法,我可能会错过?
Any idea what I could be missing?
推荐答案
我用了&LT;清/&GT;
上的HttpModules部分,因为有在项目未在bin目录为孩子(/管理)存在父
I had used <clear/>
on the httpModules section, as there were items in the parent that did not exist in the bin dir for the child (/admin)
在这样做(使用&LT;清/&GT;
这是)我无意中清除在web.config中指定的FormsAuthentication模块
C:\\ WINDOWS \\ Microsoft.NET \\框架\\ V2.0.50727 \\ CONFIG
In doing so (using <clear/>
that is ) I had inadvertently cleared the FormsAuthentication module specified in the web.config in
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG
所以我需要显式地重新添加这些孩子(/管理)配置
so i needed to re-add those explicitly to the child (/admin) config
这篇关于单点登录与窗体身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!