启动应用时报错
来源:3-7 【应用】添加初始化数据

慕粉3748812
2020-11-08
我在启动程序时 提示报错
System.InvalidOperationException: "Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.\nTo generate a developer certificate run ‘dotnet dev-certs https’. To trust the certificate (Windows and macOS only) run ‘dotnet dev-certs https --trust’.\nFor more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054."
使用了dotnet dev-certs https --trust 后报错
A valid HTTPS certificate with a key accessible across security partitions was not found. The following command will run to fix it:
‘sudo security set-key-partition-list -D localhost -S unsigned:,teamid:UBF8T346G9’
3回答
-
阿莱克斯刘
2020-11-11
你遇到的问题似乎是.net core 特定版本的bug,我在github上找到相似的问题:https://github.com/dotnet/aspnetcore/issues/19590
目前这个问题还是open的状态,还没有被解决,但是可以绕过:
确保你打开你的Keychain Access,在login keychain中删除所有localhost的证书,在system keychain中删除ASP.NET Core的证书。
在terminal中打开bash
创建一个临时文件夹,cd进去
运行连接中的script:
https://gist.github.com/javiercn/d04855b7a3581bf97d1ab9597935413f#file-generate-sh
因为我没遇到这样的问题,所以无论你成功还是失败都请告诉我一下。谢谢
222020-11-15 -
阿莱克斯刘
2020-11-11
还找到一个:https://github.com/dotnet/runtime/issues/27132
先 sudo dotnet dev-certs https --clean
然后再 dotnet dev-certs https
012020-11-14 -
阿莱克斯刘
2020-11-11
00
相似问题