简体   繁体   English

为什么我的网站无法收到来自ADFS 2.0的声明

[英]Why can't my site receive the claims from ADFS 2.0

I have successfully configured ADFS 2.0 on Windows Server 2012, and let it trust with my Web Application (ASP.NET MVC 4), but now I receive two default claims from ADFS, authenticationmethod and authenticationinstant . 我已经在Windows Server 2012上成功配置了ADFS 2.0,并使其与我的Web应用程序(ASP.NET MVC 4)信任,但是现在我收到了ADFS的两个默认声明, authenticationmethodauthenticationinstant

All I configure in the ADFS console -> issues claims with my application doesn't work (like email,phone number). 我在ADFS控制台中配置的所有内容->导致我的应用程序声明无效(如电子邮件,电话号码)。

I try to edit web.config, add the node claimType like below. 我尝试编辑web.config,添加如下所示的节点claimType

<system.identityModel>
  <identityConfiguration>
    <claimTypeRequired>
      <claimType type=URI optional=xs:boolean >
      </claimType>
    </claimTypeRequired>
  </identityConfiguration>
</system.identityModel>

But it throws an exception "Unrecognized element 'claimTypeRequired'" . 但这会引发异常"Unrecognized element 'claimTypeRequired'"

Did I miss any step? 我错过任何一步了吗?

Have a look at Use the On-Premises Organizational Authentication Option (ADFS) With ASP.NET in Visual Studio 2013 and ensure you follow the steps. 看看Visual Studio 2013中将本地组织身份验证选项(ADFS)与ASP.NET一起使用,并确保遵循以下步骤。

You can display the claims as per How To: Build Claims-Aware ASP.NET MVC Web Application Using WIF . 您可以按照如何:使用WIF构建声明感知的ASP.NET MVC Web应用程序来显示声明。

Are you sure that there are values in AD? 您确定AD中存在值吗? You do not get claims for null values. 您不会获得有关空值的声明。

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

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