发现 DotNet 无效证书 [英] DotNet not valid certificate found
本文介绍了发现 DotNet 无效证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经多次看到这个问题,但没有一个答案适合我.我的 DotNet Core 应用程序失败
I have seen this questions many times, but none of the answers works for me. My DotNet Core app fails
代码:
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
错误:
System.InvalidOperationException
HResult=0x80131509
Message=Unable to configure HTTPS endpoint. No server certificate was specified, and the default developer certificate could not be found or is out of date.
To generate a developer certificate run 'dotnet dev-certs https'. To trust the certificate (Windows and macOS only) run 'dotnet dev-certs https --trust'.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.
Source=Microsoft.AspNetCore.Server.Kestrel.Core
This exception was originally thrown at this call stack:
[External Code]
AccionesWeb.Program.Main(string[]) in Program.cs
当我尝试创建证书时,它可以毫无问题地创建它,但随后显示not found
When I try to create a cert, it creates it without problem, but then it says not found
PS ...> dotnet dev-certs https -t
Trusting the HTTPS development certificate was requested. A confirmation prompt will be displayed if the certificate was not previously trusted. Click yes on the prompt to trust the certificate.
The HTTPS developer certificate was generated successfully.
PS ...> dotnet dev-certs https -c
No valid certificate found.
推荐答案
我找到了解决方案.我不得不手动删除所有证书,因为 dotnet dev-certs https --clean
没有删除所有证书
I found the solution.
I had to manually delete all certs because dotnet dev-certs https --clean
was not removing all of them
如果您遇到此问题,请删除所有具有 友好名称 ASP.NET Core...
的 localhost
证书:
If you are facing this issue, delete all localhost
certificates with friendly name ASP.NET Core...
from:
- 当前用户>个人 >证书
- 当前用户>受信任的根证书颁发机构 >证书
更多信息在 这里
这篇关于发现 DotNet 无效证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文