我希望有人可以阐明这种情况。我有一个在 IIS Express 中运行的 WEB API。我在启用 SSL 的情况下使用它。我有一个这样调用它的控制台应用程序:
直到今天,它都运行良好。客户端在尝试连接时突然抛出异常:
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
我已经完成并确保 IIS Express 开发证书在个人证书下到位。我还修复了 IIS Express。如果我将 URL 放入 Internet Explorer,我也不会遇到这个问题。当我通过普通 HTTP 连接到 WEB API 时没有问题。是什么让这看似无缘无故开始发生?
最佳答案
Misha Beskin 对此的回答question为我解决了。仍然不知道是什么导致它一开始就搞砸了。
After spending a lot of time for me the solution was pretty simple
I just opened the Certmgr.msc ---> deleted the localhost certificate from the Trusted Root certification authorities.
Then opened my solution (after I had run the identity sever) clicked run the visual studio asked fro me if I want generate new certificate to iis express (ssl), I had clicked yes and then it started to work properly:)
关于visual-studio - IIS Express 中的 SSL 证书失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42843339/