我有一个使用自签名证书在IIS 7中运行的WCF Web服务(这是验证这是我想要的路线的概念证明)。它需要使用SSL。是否可以强制WCF测试客户端接受自签名证书?
是否可以使用WCF测试客户端调试此服务而不需要非自签名证书?
当我尝试我得到这个错误:
Error: Cannot obtain Metadata from https:///Service1.svc If this is a Windows (R) Communication Foundation service to which you have access, please check that you have enabled metadata publishing at the specified address. For help enabling metadata publishing, please refer to the MSDN documentation at http://go.microsoft.com/fwlink/?LinkId=65455.WS-Metadata Exchange Error URI: https:///Service1.svc Metadata contains a reference that cannot be resolved: 'https:///Service1.svc'. Could not establish trust relationship for the SSL/TLS secure channel with authority ''. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.HTTP GET Error URI: https:///Service1.svc There was an error downloading 'https:///Service1.svc'. The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel. The remote certificate is invalid according to the validation procedure.
编辑:这个问题是特别关于使用WCF测试客户端测试使用自签名证书通过SSL已经获得的网络服务。服务器已经设置为接受任何提供的证书,这是WCF测试客户端,我没有看到这样做的方法。
我没有看到任何方式将此代码添加到WCF测试客户端(我不控制的代码)。我已经将此调用添加到我自己的代码(服务器端)。 – 2010-05-10 15:06:56
当然,如果您试图强制任何其他C#WCF客户端接受自签名安全证书,这是正确的方法。 – stephen 2014-07-25 21:31:17