React to default hosting configuration changes
This commit is contained in:
parent
c7893f9f5a
commit
e344edc2a3
|
|
@ -75,7 +75,6 @@ namespace IISSample
|
|||
public static void Main(string[] args)
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseDefaultHostingConfiguration(args)
|
||||
.UseKestrel()
|
||||
.UseIISIntegration()
|
||||
.UseStartup<Startup>()
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@ namespace Microsoft.AspNetCore.Hosting
|
|||
throw new ArgumentNullException(nameof(app));
|
||||
}
|
||||
|
||||
var port = app.GetSetting(ServerPort);
|
||||
var path = app.GetSetting(ServerPath);
|
||||
var pairingToken = app.GetSetting(PairingToken);
|
||||
var port = app.GetSetting(ServerPort) ?? Environment.GetEnvironmentVariable($"ASPNETCORE_{ServerPort}");
|
||||
var path = app.GetSetting(ServerPath) ?? Environment.GetEnvironmentVariable($"ASPNETCORE_{ServerPath}");
|
||||
var pairingToken = app.GetSetting(PairingToken) ?? Environment.GetEnvironmentVariable($"ASPNETCORE_{PairingToken}");
|
||||
|
||||
if (!string.IsNullOrEmpty(port) && !string.IsNullOrEmpty(path) && !string.IsNullOrEmpty(pairingToken))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ namespace TestSites.Portable
|
|||
public static void Main(string[] args)
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseDefaultHostingConfiguration(args)
|
||||
.UseIISIntegration()
|
||||
.UseStartup("TestSites.Portable")
|
||||
.UseKestrel()
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@ namespace TestSites
|
|||
public static void Main(string[] args)
|
||||
{
|
||||
var host = new WebHostBuilder()
|
||||
.UseDefaultHostingConfiguration(args)
|
||||
.UseIISIntegration()
|
||||
.UseStartup("TestSites")
|
||||
.UseKestrel()
|
||||
|
|
|
|||
Loading…
Reference in New Issue