1 write to WebHost
Microsoft.AspNetCore (1)
122 references to WebHost
Aspire.Dashboard (1)
Aspire.Dashboard.Tests (2)
Aspire.Hosting (2)
Binding.Http.IntegrationTests (1)
Microsoft.AspNetCore (1)
Microsoft.AspNetCore.Diagnostics.Tests (6)
Microsoft.AspNetCore.Http.Abstractions.Tests (3)
Microsoft.AspNetCore.Http.Extensions.Tests (2)
Microsoft.AspNetCore.Identity.FunctionalTests (1)
Microsoft.AspNetCore.Mvc.FunctionalTests (6)
Microsoft.AspNetCore.Rewrite.Tests (6)
Microsoft.AspNetCore.StaticAssets.Tests (21)
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)
WebTransportSampleApp (1)