diff --git a/PlexRequests.UI/PlexRequests.UI.csproj b/PlexRequests.UI/PlexRequests.UI.csproj index 35a8c8bbc..ec6b7bfdf 100644 --- a/PlexRequests.UI/PlexRequests.UI.csproj +++ b/PlexRequests.UI/PlexRequests.UI.csproj @@ -385,11 +385,16 @@ - \ No newline at end of file diff --git a/PlexRequests.UI/Program.cs b/PlexRequests.UI/Program.cs index e5194cc33..4ae59f59e 100644 --- a/PlexRequests.UI/Program.cs +++ b/PlexRequests.UI/Program.cs @@ -59,20 +59,25 @@ namespace PlexRequests.UI Console.ReadLine(); Environment.Exit(1); } - uri = $"http://localhost:{portResult}"; + uri = $"http://*:{portResult}"; } Log.Trace("Getting product version"); WriteOutVersion(); - + var s = new Setup(); s.SetupDb(); - - if(string.IsNullOrEmpty(uri)) + + if (string.IsNullOrEmpty(uri)) uri = GetStartupUri(); -StartOptions options = new StartOptions(); -var newPort = GetPort(); - options.Urls.Add($"http://*:{newPort}"); + +; + var options = new StartOptions(uri) + { + ServerFactory = "Microsoft.Owin.Host.HttpListener" + }; + try + { using (WebApp.Start(options)) { @@ -80,6 +85,13 @@ var newPort = GetPort(); Console.WriteLine("Press any key to exit"); Console.ReadLine(); } + + } + catch (Exception e) + { + var a = e.Message; + throw; + } } private static void WriteOutVersion() @@ -92,28 +104,18 @@ var newPort = GetPort(); private static string GetStartupUri() { Log.Trace("Getting startup URI"); - var uri = "http://localhost:3579/"; + var uri = "http://*:3579/"; var service = new SettingsServiceV2(new JsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider())); var settings = service.GetSettings(); Log.Trace("Port: {0}", settings.Port); if (settings.Port != 0) { - uri = $"http://localhost:{settings.Port}"; + uri = $"http://*:{settings.Port}"; } return uri; } -private static int GetPort() -{ - - - var service = new SettingsServiceV2(new JsonRepository(new DbConfiguration(new SqliteFactory()), new MemoryCacheProvider())); - var settings = service.GetSettings(); - - return settings.Port; -} - private static void ConfigureTargets(string connectionString) { LogManager.ThrowExceptions = true; @@ -159,7 +161,7 @@ private static int GetPort() // Step 5. Activate the configuration LogManager.Configuration = config; } - catch (Exception ) + catch (Exception) { throw; diff --git a/appveyor.yml b/appveyor.yml index 21a211ec8..1b0d04f1f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,9 +3,9 @@ configuration: Release assembly_info: patch: true file: '**\AssemblyInfo.*' - assembly_version: '1.2.0' + assembly_version: '1.2.1' assembly_file_version: '{version}' - assembly_informational_version: '1.2.0' + assembly_informational_version: '1.2.1' before_build: - cmd: appveyor-retry nuget restore build: