尝试使用活动WIF来点击我的RP WCF服务并接收此错误 . 我启用了WIF跟踪,它产生:

Microsoft.IdentityModel.Tokens.FailedAuthenticationFaultException, Microsoft.IdentityModel, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 ID3242: The security token could not be authenticated or authorized.

我've googled/SO'编辑了这个并完成了许多推荐的事情here . 我还将我的audienceUris模式设置为false . 这是我的配置:

<microsoft.identityModel>
<service name="TestService">

  <audienceUris mode="Never">
    <add value="https://localhost:9080/XdsService/XDSRegistry" />
  </audienceUris>                    

  <!-- For Security Assertion Markup Language (SAML) and X.509 token authentication, you must implement an IssuerNameRegistry -->
  <issuerNameRegistry type="Microsoft.IHE.XDS.Common.Federated.CustomIssuerNameRegistry, Microsoft.IHE.XDS.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />

  <claimsAuthorizationManager type="Microsoft.IHE.XDS.Common.Federated.CustomClaimsAuthorizationManager, Microsoft.IHE.XDS.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" />

</service>

我甚至创建了自己的ClaimsAuthorizationManager和IssuerNameRegistry来调试这个......