【问题标题】:asp.net Form Authentication across sub domains跨子域的 asp.net 表单身份验证
【发布时间】:2011-08-21 21:48:15
【问题描述】:

这应该很简单,但我不知道我错过了什么。

我正在跨子域使用表单身份验证,

我有一个父域parent.com 和两个子域portal.parent.comauth.parent.comauth.parent.com 是身份验证站点。

当未经授权的用户访问portal.parent.com/site时,他们会被重定向到auth.parent.com/Account/LogOn?ReturnUrl=%2fsite,成功登录后他们会被重定向到auth.parent.com/site,这就是问题所在。我期待被重定向回portal.parent.com/site

我在两个网站上的配置

portal.parent.com/siteweb.config

<authentication mode="Forms">
  <forms loginUrl="http://auth.parent.com/Account/LogOn" enableCrossAppRedirects="true" domain=".parent.com" timeout="2880" />
</authentication>

auth.parent.com/siteweb.config

 <authentication mode="Forms">
  <forms loginUrl="~/Account/LogOn" enableCrossAppRedirects="true" domain=".parent.com" timeout="2880" />
</authentication>

除了返回 url,身份验证工作正常,即如果我返回 portal.parent.com/site我可以看到用户经过身份验证,我可以访问身份信息。

我正在阅读这个问题Forms Authentication across Sub-Domains

但对我的情况没有特别帮助。

谢谢

【问题讨论】:

    标签: asp.net asp.net-mvc-3 form-authentication


    【解决方案1】:

    我收到了这个Forms Authentication ReturnUrl and subdomain for single sign-on , 这解决了我的问题。

    不过,我不确定这是否是最好的方法。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-01-06
      • 1970-01-01
      • 1970-01-01
      • 2019-02-25
      • 1970-01-01
      • 2013-07-16
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多