WebHostBuilderIISExtensions.UseIIS(IWebHostBuilder) Method

Definition

Configures the port and base path the server should listen on when running behind AspNetCoreModule. The app will also be configured to capture startup errors.

C#
public static Microsoft.AspNetCore.Hosting.IWebHostBuilder UseIIS (this Microsoft.AspNetCore.Hosting.IWebHostBuilder hostBuilder);

Parameters

hostBuilder
IWebHostBuilder

The IWebHostBuilder to configure.

Returns

The IWebHostBuilder.

Applies to

Product Versions
ASP.NET Core 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0