【问题标题】:IBM DataPower 3.7.1.x issues with WCF clientsWCF 客户端的 IBM DataPower 3.7.1.x 问题
【发布时间】:2011-03-31 17:16:31
【问题描述】:

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

任何帮助将不胜感激。

【问题讨论】:

  • 在与 Yaron Naveh 反复多次后,我终于成功了。如果有人遇到同样的问题 - 请联系 Yaron 或我自己,我们可以指导您完成解决方案。

标签: wcf interop ws-security x509 ibm-datapower


【解决方案1】:

请公布您发送的肥皂、返回的肥皂和您的配置。

也尝试添加这个属性:

<security allowSerializedSigningTokenOnReply="true" />

(如here所述)

【讨论】:

  • 感谢您的快速回复。你摇滚!我已通过电子邮件将我的配置文件和 SOAP 请求/响应的 sn-ps 发送给您。试图弄清楚如何将 basicHttpBinding 转换为 customBinding 以根据您的博客文章设置 allowSerializedSigningTokenOnReply。
【解决方案2】:

如何从绑定转换为自定义绑定:

http://webservices20.cloudapp.net/default.aspx

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-05-04
    • 2010-11-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-04-08
    • 1970-01-01
    • 2010-09-12
    相关资源
    最近更新 更多