代码之家  ›  专栏  ›  技术社区  ›  ca9163d9

红隼应用程序使用系统证书?

  •  0
  • ca9163d9  · 技术社区  · 5 年前

    我想部署一个Asp.netWindows Server上的核心3.1应用程序。但是,在指定https端口时会出现异常。

    PS C:\Websites\Portal> .\Blazor.exe --urls https://localhost:5001
    crit: Microsoft.AspNetCore.Server.Kestrel[0]
          Unable to start Kestrel.
    System.InvalidOperationException: Unable to configure HTTPS endpoint. No server certificate was specified, and the defau
    lt 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.
       at Microsoft.AspNetCore.Hosting.ListenOptionsHttpsExtensions.UseHttps(ListenOptions listenOptions, Action`1 configure
    Options)
    

    dotnet dev-certs https --clean
    dotnet dev-certs https
    dotnet dev-certs https --trust
    

    但运气不好。(服务器上的.Net内核仍然是3.0。也许这就是原因?)

    它是一种为Kestrel应用程序使用现有证书(例如从安装的IIS)的方法吗?

    0 回复  |  直到 5 年前
    推荐文章