加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – .net core 2.1.3 ssl错误

发布时间:2020-12-15 07:57:52 所属栏目:百科 来源:网络整理
导读:大家好,我现在正在使用.net core 2.1.3 当我尝试通过firefox或chrome打开时,通过“dotnet new webapi”安装webapi项目时,它给了我这个错误 HttpsConnectionAdapter[1] Failed to authenticate HTTPS connection. System.IO.IOException: Authentication fail
大家好,我现在正在使用.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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读