Reacting to Hosting changes
This commit is contained in:
parent
a1f32e5651
commit
c43fb71cff
|
|
@ -75,7 +75,7 @@ namespace IISSample
|
|||
public static void Main(string[] args)
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseDefaultConfiguration(args)
|
||||
.UseDefaultHostingConfiguration(args)
|
||||
.UseServer("Microsoft.AspNetCore.Server.Kestrel")
|
||||
.UseIIS()
|
||||
.UseStartup<Startup>()
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="app"></param>
|
||||
/// <returns></returns>
|
||||
|
|
@ -36,6 +37,7 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
{
|
||||
var address = "http://localhost:" + port + path;
|
||||
app.UseSetting(WebHostDefaults.ServerUrlsKey, address);
|
||||
app.CaptureStartupErrors(true);
|
||||
|
||||
app.ConfigureServices(services =>
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ namespace TestSites
|
|||
public static void Main(string[] args)
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseDefaultConfiguration(args)
|
||||
.UseDefaultHostingConfiguration(args)
|
||||
.UseIIS()
|
||||
.UseStartup("TestSites")
|
||||
.UseServer("Microsoft.AspNetCore.Server.Kestrel")
|
||||
|
|
|
|||
Loading…
Reference in New Issue