Car*_*cia 4 c# https .net-core
我已经多次看到这个问题,但没有一个答案对我有用。我的 DotNet Core 应用程序失败
编码:
public static void Main(string[] args)
{
CreateHostBuilder(args).Build().Run();
}
Run Code Online (Sandbox Code Playgroud)
错误:
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
Run Code Online (Sandbox Code Playgroud)
当我尝试创建证书时,它可以毫无问题地创建它,但随后它说 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.
Run Code Online (Sandbox Code Playgroud)