using System; using System.Net.Mime; using System.Threading; using Microsoft.AspNetCore.Hosting; using Microsoft.Extensions.Hosting; namespace NameSpace { /// /// Main Program /// public class Program { /// /// Main Loop Program /// /// public static void Main(string[] args) { //start an threaded app loop //ThreadPool.QueueUserWorkItem(Core.CoreRun.Run, args); CreateHostBuilder(args).Build().Run(); } /// /// Start Kestrel Webservice /// /// /// private static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults( webBuilder => { //configure server to accept all interfaces - and not only localhost ;) webBuilder.UseUrls("http://*:5000", "https://*:5001", "http://0.0.0.0:5000", "https://0.0.0.0:5001"); webBuilder.UseStartup(); }); } }