c# – .net core 2.1.3 ssl错误

大家好,我现在正在使用.net core 2.1.3
当我尝试通过firefox或chrome打开时,通过“dotnet new webapi”安装webapi项目时,它给了我这个错误

HttpsConnectionAdapter[1] Failed to authenticate HTTPS connection.
System.IO.IOException: Authentication Failed because the remote party has closed the transport stream.

解决方法

我面临同样的问题.
在我的测试中,似乎使用Kestrel和SSL的问题. (其他IISExpress可以)

当您浏览它时,看起来SSL还没有准备好.

对我来说,修复只是简单地改变launchSetting中的位置:

"applicationUrl": "https://localhost:443;http://localhost:80"

"applicationUrl": "http://localhost:80;https://localhost:443"

使用app.UseHttpsRedirection();在Startup.cs中

它将首先进入端口80,然后重定向到端口443

相关文章

本文将从上往下,循序渐进的介绍一系列相关.NET的概念,先从...
基于 .NET 的一个全新的、好用的 PHP SDK + Runtime: Pe...
.NET 异步工作原理介绍。
引子 .NET 6 开始初步引入 PGO。PGO 即 Profile Guided Opti...
前言 2021/4/8 .NET 6 Preview 3 发布,这个版本的改进大多来...
前言 开头防杠:.NET 的基础库、语言、运行时团队从来都是相...