问题描述
我有一个WCF服务抛出一个异常,无法为SSL/TLS安全通道建立信任关系".
I have a WCF service throwing an exception, "Could not establish trust relationship for the SSL/TLS secure channel".
启动服务时,IIS Express会提示您信任IIS Express SSL证书,然后选择是".从IE10访问端点时,地址栏变为红色,表明证书错误.当我运行代码并到达端点时,将引发异常.
When launching the service, IIS Express prompts to trust the IIS Express SSL Certificate and I select Yes. When accessing the endpoint from IE10, the address bar turns red indicating a certificate error. When I run my code and hit the endpoint, the exception is thrown.
如何在IIS Express中解决此问题?
How do I resolve this in IIS Express?
使用Visual Studio 2013 Update 2和IIS Express.
Using Visual Studio 2013 Update 2 and IIS Express.
推荐答案
证书可能仅在个人存储中(CurrentUser \ My或LocalMachine \ My),并且肯定是自签名的.使用mmc检查证书是否在受信任的根"存储中.如果没有将其复制到该位置(可能在LocalMachine \ Trusted Root中,以便所有用户都可以信任此证书).
The certificate is probably only in Personal store (CurrentUser\My or LocalMachine\My) and it certainly is selfsigned. Check if the certificate is in Trusted Root store using mmc. If not copy it there (probably in LocalMachine\Trusted Root so that all users will trust this certificate).
这篇关于如何解决“无法为SSL/TLS安全通道建立信任关系"?与IIS Express的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!