Beispiel #1
0
 public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
 WebHost.CreateDefaultBuilder(args)
 .ConfigureWebHostDefaults((webBuilder, ConfigurationBinder) =>
 {
     ConfigurationBinder.AddJsonFile("appsettings.json", optional: True);
 })
 .UseStartup <Startup>();
 public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
 WebHost.CreateDefaultBuilder(args)
 .UseStartup <Startup>()
 .UseKestrel()
 .UseUrls("http://*:80")
 .ConfigureAppConfiguration((WebHostBuilder, ConfigurationBinder) =>
 {
     ConfigurationBinder.AddJsonFile("appsettings.json", optional: true);
 });