IBM DataPower 3.7.1.x 与 WCF 客户端相关的问题

2023-12-09

我尝试在 WCF 中使用 IBM DataPower 3.7.1.x Web 服务,但收到以下错误消息:

找不到“System.IdentityModel.Tokens.X509SecurityToken”令牌类型的令牌身份验证器。根据当前的安全设置,无法接受该类型的令牌。

HTTP 响应返回为 200,我可以在 Fiddler 中调试它时看到正确的 SOAP 响应。

但是,WCF 客户端似乎不知道如何处理 SOAP 响应中的 BinarySecurityToken 元素。

这是我的 WCF 配置:

  <bindings>
    <basicHttpBinding>
      <binding name="TestBinding">
        <security mode="TransportWithMessageCredential">
          <message clientCredentialType="Certificate" />
        </security>
      </binding>
    </basicHttpBinding>
  </bindings>

  <behaviors>
    <endpointBehaviors>
      <behavior name="TestBehavior">
        <callbackDebug includeExceptionDetailInFaults="true" />
        <clientCredentials>
          <clientCertificate storeLocation="LocalMachine" 
                             storeName="My" 
                             x509FindType="FindBySubjectName" 
                             findValue="test-cert"  />
          <serviceCertificate>
            <authentication certificateValidationMode ="PeerOrChainTrust" />
          </serviceCertificate>
        </clientCredentials>
      </behavior>
    </endpointBehaviors>
  </behaviors>

  <client>
     <endpoint  address="https://serviceURL"
                binding="basicHttpBinding"
                bindingConfiguration="TestBinding"
                behaviorConfiguration="TestBehavior"
                contract="ContraceGoesHere"
                name="ContraceNameGoesHere" />
  </client>

我看到其他人向 Microsoft 和 IBM 报告了类似的问题,并且有一些关于它的 StackOverflow 问题,但是我还没有找到有效的解决方案。

任何帮助,将不胜感激。


请发布您发送的肥皂、返回的肥皂以及您的配置。

还尝试添加此属性:

<security allowSerializedSigningTokenOnReply="true" />

(如所描述的here)

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

IBM DataPower 3.7.1.x 与 WCF 客户端相关的问题 的相关文章

随机推荐