我遇到了通过证书进行身份验证的WCF服务问题。我得到的错误是传出消息的身份检查失败。远程端点的预期DNS标识是xxx ....
我看过很多关于此的帖子,所有人都说将dns设置为证书的名称/主题。
<identity>
<dns value="WcfServer" />
</identity>
我试过这个并且它不起作用,我还能做什么?
路
答案 0 :(得分:2)
DNS名称应与证书的公用名(CN)匹配。
看到这个类似的其他线程。 Why does WCF complain over identity check failure?
答案 1 :(得分:1)
您可以检查服务的WSDL文件。它将向您显示服务在元素下所期望的身份。例如,像这样,
<wsdl:service name="CalculatorService">
<wsdl:port name="WSHttpBinding_ICalculator_Windows"
binding="tns:WSHttpBinding_ICalculator_Windows">
<soap12:address
location=
"http://localhost:8003/servicemodelsamples/service/upnidentity" />
<wsa10:EndpointReference>
<wsa10:Address>
http://localhost:8003/servicemodelsamples/service/upnidentity
</wsa10:Address>
<Identity
xmlns="http://schemas.xmlsoap.org/ws/2006/02/addressingidentity">
<Upn>username@contoso.com</Upn>
</Identity>
</wsa10:EndpointReference>
</wsdl:port>
</wsdl:service>
根据服务选择的身份,您可以在客户端端点设置它。
HTH, 阿米特