信任Windows和macOS上的ASP.NET核心HTTPS开发证书

.NET Core SDK包含HTTPS开发证书。证书作为首次运行体验的一部分安装。例如,dotnet --info生成类似于以下内容的输出:

文本复制
ASP.NET Core
------------
Successfully installed the ASP.NET Core HTTPS Development Certificate.
To trust the certificate run 'dotnet dev-certs https --trust' (Windows and macOS only).
For establishing trust on other platforms refer to the platform specific documentation.
For more information on configuring HTTPS see https://go.microsoft.com/fwlink/?linkid=848054.

安装.NET Core SDK会将ASP.NET Core HTTPS开发证书安装到本地用户证书存储区。证书已安装,但不受信任。要信任证书,请执行一次性步骤以运行dotnet dev-certs工具:

安慰复制
dotnet dev-certs https --trust

以下命令提供有关该dev-certs工具的帮助:

安慰复制
dotnet dev-certs https --help
05-03 21:54