WCF客户端的IBM DataPower 3.7.1.x问题 [英] IBM DataPower 3.7.1.x issues with WCF clients

查看:122
本文介绍了WCF客户端的IBM DataPower 3.7.1.x问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to consume an IBM DataPower 3.7.1.x web service in WCF getting the following error message:

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

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

The HTTP response is coming back as 200 and I can see the correct SOAP response while debugging it in Fiddler.

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

However, the WCF clients doesn't seem to know how to process the BinarySecurityToken element in the SOAP response.

这是我的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的问题,但是我还没有找到一个可行的解决方案.

I've seen other people reporting similar problems both to Microsoft and IBM and there are some StackOverflow questions about it, however I haven't found a single solution that works.

任何帮助将不胜感激.

推荐答案

请发布您发送的肥皂,回来的肥皂和您的配置.

please publish the soap that you send, the one which comes back and your config.

还尝试添加此属性:

<security allowSerializedSigningTokenOnReply="true" />

(如此处所述)

这篇关于WCF客户端的IBM DataPower 3.7.1.x问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆