diff --git a/src/Api/Program.cs b/src/Api/Program.cs index 69d6f0bb8b..083713695c 100644 --- a/src/Api/Program.cs +++ b/src/Api/Program.cs @@ -1,4 +1,4 @@ -using System.IO; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; namespace Bit.Api @@ -7,14 +7,11 @@ namespace Bit.Api { public static void Main(string[] args) { - var host = new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() + WebHost + .CreateDefaultBuilder(args) .UseStartup() - .Build(); - - host.Run(); + .Build() + .Run(); } } } diff --git a/src/Billing/Program.cs b/src/Billing/Program.cs index 9a3072e9e7..e2a33eac68 100644 --- a/src/Billing/Program.cs +++ b/src/Billing/Program.cs @@ -1,4 +1,4 @@ -using System.IO; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; namespace Bit.Billing @@ -7,14 +7,11 @@ namespace Bit.Billing { public static void Main(string[] args) { - var host = new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() + WebHost + .CreateDefaultBuilder(args) .UseStartup() - .Build(); - - host.Run(); + .Build() + .Run(); } } } diff --git a/src/Identity/Program.cs b/src/Identity/Program.cs index 2f46915c5f..5e1912f3eb 100644 --- a/src/Identity/Program.cs +++ b/src/Identity/Program.cs @@ -1,4 +1,4 @@ -using System.IO; +using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; namespace Bit.Identity @@ -7,14 +7,11 @@ namespace Bit.Identity { public static void Main(string[] args) { - var host = new WebHostBuilder() - .UseKestrel() - .UseContentRoot(Directory.GetCurrentDirectory()) - .UseIISIntegration() + WebHost + .CreateDefaultBuilder(args) .UseStartup() - .Build(); - - host.Run(); + .Build() + .Run(); } } }