Reacting to hosting rename
This commit is contained in:
parent
4d4dfedd59
commit
488187ff79
|
|
@ -46,13 +46,13 @@ namespace IISSample
|
|||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var application = new WebApplicationBuilder()
|
||||
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
|
||||
var host = new WebHostBuilder()
|
||||
.UseDefaultConfiguration(args)
|
||||
.UseIISPlatformHandlerUrl()
|
||||
.UseStartup<Startup>()
|
||||
.Build();
|
||||
|
||||
application.Run();
|
||||
host.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Microsoft.AspNet.Hosting
|
|||
/// </summary>
|
||||
/// <param name="app"></param>
|
||||
/// <returns></returns>
|
||||
public static IWebApplicationBuilder UseIISPlatformHandlerUrl(this IWebApplicationBuilder app)
|
||||
public static IWebHostBuilder UseIISPlatformHandlerUrl(this IWebHostBuilder app)
|
||||
{
|
||||
if (app == null)
|
||||
{
|
||||
|
|
@ -29,7 +29,7 @@ namespace Microsoft.AspNet.Hosting
|
|||
if (!string.IsNullOrEmpty(port))
|
||||
{
|
||||
var address = "http://localhost:" + port + path;
|
||||
app.UseSetting(WebApplicationDefaults.ServerUrlsKey, address);
|
||||
app.UseSetting(WebHostDefaults.ServerUrlsKey, address);
|
||||
}
|
||||
|
||||
return app;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ namespace Microsoft.AspNet.IISPlatformHandler
|
|||
{
|
||||
var assertsExecuted = false;
|
||||
|
||||
var builder = new WebApplicationBuilder()
|
||||
var builder = new WebHostBuilder()
|
||||
.Configure(app =>
|
||||
{
|
||||
app.UseIISPlatformHandler();
|
||||
|
|
@ -44,7 +44,7 @@ namespace Microsoft.AspNet.IISPlatformHandler
|
|||
{
|
||||
var assertsExecuted = false;
|
||||
|
||||
var builder = new WebApplicationBuilder()
|
||||
var builder = new WebHostBuilder()
|
||||
.Configure(app =>
|
||||
{
|
||||
app.UseIISPlatformHandler(new IISPlatformHandlerOptions
|
||||
|
|
|
|||
|
|
@ -9,13 +9,13 @@ namespace TestSites
|
|||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
var application = new WebApplicationBuilder()
|
||||
.UseConfiguration(WebApplicationConfiguration.GetDefault(args))
|
||||
var host = new WebHostBuilder()
|
||||
.UseDefaultConfiguration(args)
|
||||
.UseIISPlatformHandlerUrl()
|
||||
.UseStartup("TestSites")
|
||||
.Build();
|
||||
|
||||
application.Run();
|
||||
host.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue