Skip to content

ConfigureWebHost used with WebApplicationBuilder.Host (ASP0008)

Key dotnet.api.configurewebhost-on-builder-host · Severity error · Category api

ASP.NET Core analyzer ASP0008. Flags ConfigureWebHost called on WebApplicationBuilder.Host, which throws at startup; builder.WebHost is the supported way.

builder.Host.ConfigureWebHost(web => web.UseUrls("http://*:8080"));
builder.WebHost.UseUrls("http://*:8080");