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。

适用于