IBM DataPower 3.7.1.x 与 WCF 客户端相关的问题
我尝试在 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 问题,但是我还没有找到有效的解决方案。
任何帮助将不胜感激。
I'm trying to consume an IBM DataPower 3.7.1.x web service in WCF getting the following error message:
Cannot find a token authenticator for the 'System.IdentityModel.Tokens.X509SecurityToken' token type. Tokens of that type cannot be accepted according to current security settings.
The HTTP response is coming back as 200 and I can see the correct SOAP response while debugging it in Fiddler.
However, the WCF clients doesn't seem to know how to process the BinarySecurityToken element in the SOAP response.
Here is my WCF config:
<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>
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.
Any help would be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
请发布您发送的肥皂、返回的肥皂以及您的配置。
还尝试添加此属性:(
如此处所述)
please publish the soap that you send, the one which comes back and your config.
also try to add this attribute:
(as described here)
如何从绑定转换为自定义绑定:
http://webservices20.cloudapp.net/default.aspx
How to convert from Binding to Custom Binding:
http://webservices20.cloudapp.net/default.aspx