WebHostBuilderKestrelExtensions.UseKestrelHttpsConfiguration 方法

定義

在案例中 UseKestrelCore(IWebHostBuilder) ,可能需要明確加入宣告特定 HTTPS 功能。 例如,如果 ASPNETCORE_URLS 包含 https:// 位址, UseKestrelHttpsConfiguration(IWebHostBuilder) 將會在該端點上啟用 HTTPS 的設定。

在案例中 UseKestrel(IWebHostBuilder) 沒有任何作用。

public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseKestrelHttpsConfiguration (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder);
static member UseKestrelHttpsConfiguration : Microsoft.AspNetCore.Hosting.IWebHostBuilder -> Microsoft.AspNetCore.Hosting.IWebHostBuilder
<Extension()>
Public Function UseKestrelHttpsConfiguration (hostBuilder As IWebHostBuilder) As IWebHostBuilder

參數

hostBuilder
IWebHostBuilder

要設定的 Microsoft.AspNetCore.Hosting.IWebHostBuilder。

傳回

Microsoft.AspNetCore.Hosting.IWebHostBuilder。

適用於