1 write to WebHost
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
216WebHost = new ConfigureWebHostBuilder(webHostContext, Configuration, Services);
124 references to WebHost
Aspire.Dashboard (1)
DashboardWebApplication.cs (1)
584builder.WebHost.ConfigureKestrel((context, serverOptions) =>
Aspire.Dashboard.Tests (2)
Integration\DashboardClientAuthTests.cs (1)
78serverAppBuilder.WebHost.ConfigureKestrel(ConfigureKestrel);
Integration\IntegrationTestHelpers.cs (1)
100builder.WebHost.ConfigureKestrel(serverOptions =>
Aspire.Hosting (2)
Dashboard\DashboardServiceHost.cs (2)
76builder.WebHost.UseKestrelHttpsConfiguration(); 120builder.WebHost.ConfigureKestrel(ConfigureKestrel);
Binding.Http.IntegrationTests (1)
MtomBindingTestHelper.cs (1)
44builder.WebHost.ConfigureKestrel(serverOptions =>
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
203[MemberNotNull(nameof(Environment), nameof(Host), nameof(WebHost))]
Microsoft.AspNetCore.Authentication.JwtBearer.Tools.Tests (1)
UserJwtsTests.cs (1)
82builder.WebHost.UseTestServer();
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(); 381Assert.Throws<NotSupportedException>(() => ((IWebHostBuilder)createBuilder().WebHost).Build()); 395Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.ApplicationKey, nameof(WebApplicationTests))); 396Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.EnvironmentKey, envName)); 397Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.ContentRootKey, contentRoot)); 398Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.WebRootKey, webRoot)); 399Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.HostingStartupAssembliesKey, "hosting")); 400Assert.Throws<NotSupportedException>(() => builder.WebHost.UseSetting(WebHostDefaults.HostingStartupExcludeAssembliesKey, "hostingexclude")); 401Assert.Throws<NotSupportedException>(() => builder.WebHost.UseEnvironment(envName)); 402Assert.Throws<NotSupportedException>(() => builder.WebHost.UseContentRoot(contentRoot)); 415Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 423Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 431Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 439Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 447Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 455Assert.Throws<NotSupportedException>(() => builder.WebHost.ConfigureAppConfiguration(builder => 480builder.WebHost.UseContentRoot(contentRoot + Path.DirectorySeparatorChar); 481builder.WebHost.UseContentRoot(contentRoot.ToUpperInvariant()); 482builder.WebHost.UseContentRoot(contentRoot.ToLowerInvariant()); 519builder.WebHost.UseWebRoot(webRoot); 548builder.WebHost.UseWebRoot(fullWebRootPath); 590builder.WebHost.UseWebRoot(webRoot); 625builder.WebHost.UseContentRoot(AppContext.BaseDirectory); 626builder.WebHost.UseContentRoot(Path.TrimEndingDirectorySeparator(AppContext.BaseDirectory)); 627builder.WebHost.UseContentRoot(""); 946builder.WebHost.ConfigureAppConfiguration((context, config) => 988builder.WebHost.ConfigureAppConfiguration((context, config) => 1051builder.WebHost.ConfigureAppConfiguration((context, config) => 1100builder.WebHost.UseSetting("A", "value"); 1101builder.WebHost.UseSetting("B", "another"); 1103Assert.Equal("value", builder.WebHost.GetSetting("A")); 1104Assert.Equal("another", builder.WebHost.GetSetting("B")); 1357var host = builder.WebHost 1443builder.WebHost.UseTestServer(); 1578builder.WebHost.UseTestServer(); 1617builder.WebHost.UseTestServer(); 1667builder.WebHost.UseTestServer(); 1689builder.WebHost.UseTestServer(); 1716builder.WebHost.UseTestServer(); 1833var ex = Assert.Throws<NotSupportedException>(() => builder.WebHost.Configure(app => { })); 1834var ex1 = Assert.Throws<NotSupportedException>(() => builder.WebHost.Configure((context, app) => { })); 1835var ex2 = Assert.Throws<NotSupportedException>(() => builder.WebHost.UseStartup<MyStartup>()); 1836var ex3 = Assert.Throws<NotSupportedException>(() => builder.WebHost.UseStartup(typeof(MyStartup))); 1837var ex4 = Assert.Throws<NotSupportedException>(() => builder.WebHost.UseStartup(context => new MyStartup())); 1861builder.WebHost.UseTestServer(); 1888builder.WebHost.UseTestServer(); 1924builder.WebHost.UseTestServer(); 1951builder.WebHost.UseTestServer(); 2016builder.WebHost.UseTestServer(); 2030builder.WebHost.UseTestServer(); 2052builder.WebHost.UseTestServer(); 2082builder.WebHost.UseTestServer(); 2136builder.WebHost.UseTestServer(); 2161builder.WebHost.UseTestServer(); 2228builder.WebHost.ConfigureAppConfiguration((ctx, config) => { }); 2401builder.WebHost.UseTestServer(); 2444builder.WebHost.UseTestServer(); 2484builder.WebHost.UseTestServer(); 2541builder.WebHost.UseTestServer(); 2567builder.WebHost.UseTestServer(); 2593builder.WebHost.UseTestServer(); 2620builder.WebHost.UseTestServer(); 2650builder.WebHost.UseTestServer(); 2734builder.WebHost.UseTestServer(); 2762builder.WebHost.UseTestServer();
TlsFeaturesObserve (1)
Program.cs (1)
20builder.WebHost.UseHttpSys(options =>
WebTransportInteractiveSampleApp (1)
Program.cs (1)
22builder.WebHost.ConfigureKestrel((context, options) =>
WebTransportSampleApp (1)
Program.cs (1)
12builder.WebHost.ConfigureKestrel((context, options) =>