1 write to WebHost
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
214WebHost = new ConfigureWebHostBuilder(webHostContext, Configuration, Services);
122 references to WebHost
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
562builder.WebHost.ConfigureKestrel((context, serverOptions) =>
Aspire.Dashboard.Tests (2)
Integration\DashboardClientAuthTests.cs (1)
81serverAppBuilder.WebHost.ConfigureKestrel(ConfigureKestrel);
Integration\IntegrationTestHelpers.cs (1)
100builder.WebHost.ConfigureKestrel(serverOptions =>
Aspire.Hosting (2)
Dashboard\DashboardServiceHost.cs (2)
73builder.WebHost.UseKestrelHttpsConfiguration(); 116builder.WebHost.ConfigureKestrel(ConfigureKestrel);
Binding.Http.IntegrationTests (1)
MtomBindingTestHelper.cs (1)
44builder.WebHost.ConfigureKestrel(serverOptions =>
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
201[MemberNotNull(nameof(Environment), nameof(Host), nameof(WebHost))]
Microsoft.AspNetCore.Diagnostics.Tests (6)
ExceptionHandlerTest.cs (4)
779builder.WebHost.UseTestServer(); 830builder.WebHost.UseTestServer(); 885builder.WebHost.UseTestServer(); 936builder.WebHost.UseTestServer();
StatusCodeMiddlewareTest.cs (2)
251builder.WebHost.UseTestServer(); 287builder.WebHost.UseTestServer();
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
UsePathBaseExtensionsTests.cs (3)
145builder.WebHost.UseTestServer(); 170builder.WebHost.UseTestServer(); 192builder.WebHost.UseTestServer();
Microsoft.AspNetCore.Http.Extensions.Tests (2)
HttpResponseJsonExtensionsTests.cs (2)
492builder.WebHost.UseTestServer(); 525builder.WebHost.UseTestServer();
Microsoft.AspNetCore.Identity.FunctionalTests (1)
MapIdentityApiTests.cs (1)
1282builder.WebHost.UseTestServer(options =>
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
AntiforgeryMiddlewareTest.cs (6)
28builder.WebHost.UseTestServer(); 60builder.WebHost.UseTestServer(); 74builder.WebHost.UseTestServer(); 101builder.WebHost.UseTestServer(); 144builder.WebHost.UseTestServer(); 176builder.WebHost.UseTestServer();
Microsoft.AspNetCore.Rewrite.Tests (6)
MiddlewareTests.cs (6)
848builder.WebHost.UseTestServer(); 883builder.WebHost.UseTestServer(); 919builder.WebHost.UseTestServer(); 955builder.WebHost.UseTestServer(); 992builder.WebHost.UseTestServer(); 1029builder.WebHost.UseTestServer();
Microsoft.AspNetCore.StaticAssets.Tests (21)
StaticAssetsIntegrationTests.cs (21)
43builder.WebHost.ConfigureServices(services => 47builder.WebHost.UseTestServer(); 93builder.WebHost.ConfigureServices(services => 97builder.WebHost.UseTestServer(); 144builder.WebHost.ConfigureServices(services => 149builder.WebHost.UseTestServer(); 196builder.WebHost.ConfigureServices(services => 200builder.WebHost.UseTestServer(); 253builder.WebHost.ConfigureServices(services => 257builder.WebHost.UseTestServer(); 309builder.WebHost.UseSetting(StaticAssetDevelopmentRuntimeHandler.ReloadStaticAssetsAtRuntimeKey, "true"); 310builder.WebHost.ConfigureServices(services => 314builder.WebHost.UseTestServer(); 364builder.WebHost.UseSetting(StaticAssetDevelopmentRuntimeHandler.ReloadStaticAssetsAtRuntimeKey, "true"); 365builder.WebHost.ConfigureServices(services => 369builder.WebHost.UseTestServer(); 417builder.WebHost.UseSetting(StaticAssetDevelopmentRuntimeHandler.ReloadStaticAssetsAtRuntimeKey, "true"); 418builder.WebHost.ConfigureServices(services => 422builder.WebHost.UseTestServer(); 601builder.WebHost.ConfigureServices(services => 605builder.WebHost.UseTestServer();
Microsoft.AspNetCore.Tests (68)
WebApplicationTests.cs (68)
55builder.WebHost.UseKestrelCore(); 85builder.WebHost.UseKestrelCore(); 115builder.WebHost.UseKestrelCore(); 146builder.WebHost.UseKestrelCore(); 380Assert.Throws<NotSupportedException>(() => ((IWebHostBuilder)createBuilder().WebHost).Build()); 393Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.ApplicationKey, nameof(WebApplicationTests))); 394Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.EnvironmentKey, envName)); 395Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.ContentRootKey, contentRoot)); 396Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.WebRootKey, webRoot)); 397Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, "hosting")); 398Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.HostingStartupExcludeAssembliesKey, "hostingexclude")); 399Assert.Throws<NotSupportedException>(() => builder.WebHost.UseEnvironment(envName)); 400Assert.Throws<NotSupportedException>(() => builder.WebHost.UseContentRoot(contentRoot)); 413Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 421Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 429Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 437Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 445Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 453Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 478builder.WebHost.UseContentRoot(contentRoot + Path.DirectorySeparatorChar); 479builder.WebHost.UseContentRoot(contentRoot.ToUpperInvariant()); 480builder.WebHost.UseContentRoot(contentRoot.ToLowerInvariant()); 517builder.WebHost.UseWebRoot(webRoot); 546builder.WebHost.UseWebRoot(fullWebRootPath); 588builder.WebHost.UseWebRoot(webRoot); 623builder.WebHost.UseContentRoot(AppContext.BaseDirectory); 624builder.WebHost.UseContentRoot(Path.TrimEndingDirectorySeparator(AppContext.BaseDirectory)); 625builder.WebHost.UseContentRoot(""); 944builder.WebHost.ConfigureAppConfiguration((context, config) => 986builder.WebHost.ConfigureAppConfiguration((context, config) => 1049builder.WebHost.ConfigureAppConfiguration((context, config) => 1098builder.WebHost.UseSetting("A", "value"); 1099builder.WebHost.UseSetting("B", "another"); 1101Assert.Equal("value", builder.WebHost.GetSetting("A")); 1102Assert.Equal("another", builder.WebHost.GetSetting("B")); 1355var host = builder.WebHost 1441builder.WebHost.UseTestServer(); 1576builder.WebHost.UseTestServer(); 1615builder.WebHost.UseTestServer(); 1665builder.WebHost.UseTestServer(); 1687builder.WebHost.UseTestServer(); 1714builder.WebHost.UseTestServer(); 1831var ex = Assert.Throws<NotSupportedException>(() => builder.WebHost.Configure(app => { })); 1832var ex1 = Assert.Throws<NotSupportedException>(() => builder.WebHost.Configure((context, app) => { })); 1833var ex2 = Assert.Throws<NotSupportedException>(() => builder.WebHost.UseStartup<MyStartup>()); 1834var ex3 = Assert.Throws<NotSupportedException>(() => builder.WebHost.UseStartup(typeof(MyStartup))); 1835var ex4 = Assert.Throws<NotSupportedException>(() => builder.WebHost.UseStartup(context => new MyStartup())); 1859builder.WebHost.UseTestServer(); 1886builder.WebHost.UseTestServer(); 1922builder.WebHost.UseTestServer(); 1949builder.WebHost.UseTestServer(); 2014builder.WebHost.UseTestServer(); 2028builder.WebHost.UseTestServer(); 2050builder.WebHost.UseTestServer(); 2080builder.WebHost.UseTestServer(); 2134builder.WebHost.UseTestServer(); 2159builder.WebHost.UseTestServer(); 2226builder.WebHost.ConfigureAppConfiguration((ctx, config) => { }); 2399builder.WebHost.UseTestServer(); 2442builder.WebHost.UseTestServer(); 2482builder.WebHost.UseTestServer(); 2539builder.WebHost.UseTestServer(); 2565builder.WebHost.UseTestServer(); 2591builder.WebHost.UseTestServer(); 2618builder.WebHost.UseTestServer(); 2648builder.WebHost.UseTestServer(); 2732builder.WebHost.UseTestServer(); 2760builder.WebHost.UseTestServer();
WebTransportInteractiveSampleApp (1)
Program.cs (1)
22builder.WebHost.ConfigureKestrel((context, options) =>
WebTransportSampleApp (1)
Program.cs (1)
12builder.WebHost.ConfigureKestrel((context, options) =>