visual-studio - IIS Express 中的 SSL 证书失败

标签 visual-studio ssl iis-express

我希望有人可以阐明这种情况。我有一个在 IIS Express 中运行的 WEB API。我在启用 SSL 的情况下使用它。我有一个这样调用它的控制台应用程序:

https://localhost:12345/api/Controller/Method/arg

直到今天,它都运行良好。客户端在尝试连接时突然抛出异常:

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/

相关文章:

visual-studio - 学习哪种汇编语言

c# - 如何避免 .Validating() Cancel 导致应用程序退出挂起?

c# - 我的 NET Core Web API Controller 出现“找不到页面”错误

c# - 对于 OData 和 ASP.NET Core,URL 太长

c# - Convert.FromBase64String(...) 抛出 FormatException

c# - 如何在 C# 中运行 Windows bash

ssl - SSL固定(嵌入主机)和普通证书(由服务器提供)有什么区别

ssl - XAMPP 中跨 LAN 的本地主机自签名证书

python-2.7 - 为什么 Flask + SocketIO + Gevent 给我 SSL EOF 错误?

asp.net-mvc - 如何从 jake 运行和停止 IISExpress