我尝试在 WCF 中使用 IBM DataPower 3.7.1.x Web 服务,但收到以下错误消息:
找不到“System.IdentityModel.Tokens.X509SecurityToken” token 类型的 token 验证器。根据当前的安全设置,无法接受该类型的 token 。
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 问题,但我还没有找到有效的解决方案。
如有任何帮助,我们将不胜感激。
最佳答案
关于wcf - IBM DataPower 3.7.1.x 与 WCF 客户端相关的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5503684/