【发布时间】:2021-09-23 17:45:15
【问题描述】:
我们阅读this documentation。
我们在 PowerShell 中运行了以下命令:
dotnet dev-certs https --clean
dotnet dev-certs https --trust
dotnet dev-certs https --check # none found :-(
然后我们打开一个新的 PowerShell 会话并运行:
dotnet dev-certs https --check # still none found :-(
dotnet run
这是错误信息。
System.InvalidOperationException:无法配置 HTTPS 端点。未指定服务器证书,默认开发者证书找不到或已过期。
这是dotnet --info的输出
.NET SDK (reflecting any global.json):
Version: 5.0.302
Commit: c005824e35
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19042
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\5.0.302\
Host (useful for support):
Version: 5.0.8
Commit: 35964c9215
我们如何将dotnet run 指向我们使用dotnet dev-certs https --trust 创建的证书?
【问题讨论】:
-
这能解决您的问题吗? - stackoverflow.com/questions/65266363/…
标签: c# ssl .net-core windows-10 dotnet-cli