From ecb57a240b3b994bfcea9ee7cd23f5e7535969b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20G=C3=B3mez=20Cuenca?= Date: Tue, 8 Dec 2020 13:27:34 +0100 Subject: [PATCH] Hotfix, again... --- Bot_Discord_CSharp/Program.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Bot_Discord_CSharp/Program.cs b/Bot_Discord_CSharp/Program.cs index abcee1d..845b8c1 100644 --- a/Bot_Discord_CSharp/Program.cs +++ b/Bot_Discord_CSharp/Program.cs @@ -2,6 +2,7 @@ using Microsoft.AspNetCore; using Microsoft.AspNetCore.Hosting; using System; +using System.IO; namespace Bot_Discord_CSharp { @@ -9,18 +10,18 @@ namespace Bot_Discord_CSharp { static void Main(string[] args) { - var host = CreateWebHostBuilder(args). - UseKestrel(). - UseUrls("http://0.0.0.0:" + Environment.GetEnvironmentVariable("$PORT")). - Build(); + var host = new WebHostBuilder() + .UseKestrel() + .UseContentRoot(Directory.GetCurrentDirectory()) + .UseIISIntegration() + .UseStartup() + .UseUrls("http://0.0.0.0:" + Environment.GetEnvironmentVariable("$PORT")) + .Build(); host.Run(); Bot bot = new Bot(); bot.RunAsync().GetAwaiter().GetResult(); } - public static IWebHostBuilder CreateWebHostBuilder(string[] args) => - WebHost.CreateDefaultBuilder(args) - .UseStartup(); } }