From c02e187f326475825dbcd06bbacf699a50822dec Mon Sep 17 00:00:00 2001 From: "kay.one" Date: Sat, 6 Jul 2013 12:10:11 -0700 Subject: [PATCH] updated OWIN --- .../NzbDrone.Integration.Test.csproj | 12 ++++++++---- NzbDrone.Integration.Test/packages.config | 5 +++-- NzbDrone/NzbDrone.csproj | 16 ++++++++++------ NzbDrone/Owin/OwinHostController.cs | 14 ++++++++------ NzbDrone/packages.config | 9 +++++---- 5 files changed, 34 insertions(+), 22 deletions(-) diff --git a/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj b/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj index ed22089bc..e9f35f536 100644 --- a/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj +++ b/NzbDrone.Integration.Test/NzbDrone.Integration.Test.csproj @@ -41,12 +41,16 @@ False ..\packages\FluentValidation.4.0.0.0\lib\Net40\FluentValidation.dll - - ..\packages\Microsoft.Owin.Host.HttpListener.0.21.0-pre\lib\net40\Microsoft.Owin.Host.HttpListener.dll + + ..\packages\Microsoft.Owin.1.1.0-beta2\lib\net40\Microsoft.Owin.dll - + False - ..\packages\Microsoft.Owin.Hosting.0.21.0-pre\lib\net40\Microsoft.Owin.Hosting.dll + ..\packages\Microsoft.Owin.Host.HttpListener.1.1.0-beta2\lib\net40\Microsoft.Owin.Host.HttpListener.dll + + + False + ..\packages\Microsoft.Owin.Hosting.1.1.0-beta2\lib\net40\Microsoft.Owin.Hosting.dll False diff --git a/NzbDrone.Integration.Test/packages.config b/NzbDrone.Integration.Test/packages.config index 1e195b5b9..80db9bbad 100644 --- a/NzbDrone.Integration.Test/packages.config +++ b/NzbDrone.Integration.Test/packages.config @@ -2,8 +2,9 @@ - - + + + diff --git a/NzbDrone/NzbDrone.csproj b/NzbDrone/NzbDrone.csproj index 6b953afc9..905fff021 100644 --- a/NzbDrone/NzbDrone.csproj +++ b/NzbDrone/NzbDrone.csproj @@ -94,19 +94,23 @@ False - ..\packages\Microsoft.AspNet.SignalR.Core.1.1.1\lib\net40\Microsoft.AspNet.SignalR.Core.dll + ..\packages\Microsoft.AspNet.SignalR.Core.1.1.2\lib\net40\Microsoft.AspNet.SignalR.Core.dll False - ..\packages\Microsoft.AspNet.SignalR.Owin.1.1.1\lib\net40\Microsoft.AspNet.SignalR.Owin.dll + ..\packages\Microsoft.AspNet.SignalR.Owin.1.1.2\lib\net40\Microsoft.AspNet.SignalR.Owin.dll - - ..\packages\Microsoft.Owin.Host.HttpListener.0.21.0-pre\lib\net40\Microsoft.Owin.Host.HttpListener.dll + + ..\packages\Microsoft.Owin.1.1.0-beta2\lib\net40\Microsoft.Owin.dll - + False - ..\packages\Microsoft.Owin.Hosting.0.21.0-pre\lib\net40\Microsoft.Owin.Hosting.dll + ..\packages\Microsoft.Owin.Host.HttpListener.1.1.0-beta2\lib\net40\Microsoft.Owin.Host.HttpListener.dll + + + False + ..\packages\Microsoft.Owin.Hosting.1.1.0-beta2\lib\net40\Microsoft.Owin.Hosting.dll ..\packages\Nancy.0.16.1\lib\net40\Nancy.dll diff --git a/NzbDrone/Owin/OwinHostController.cs b/NzbDrone/Owin/OwinHostController.cs index b3d1ae7d4..4bc6886f7 100644 --- a/NzbDrone/Owin/OwinHostController.cs +++ b/NzbDrone/Owin/OwinHostController.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; using Microsoft.Owin.Hosting; using NLog; -using NzbDrone.Common; using NzbDrone.Core.Configuration; using NzbDrone.Owin.MiddleWare; using Owin; @@ -26,19 +25,22 @@ namespace NzbDrone.Owin public void StartServer() { - var options = new StartOptions + var url = "http://*:" + _configFileProvider.Port; + + var options = new StartOptions(url) { - Url = "http://*:" + _configFileProvider.Port, - App = GetType().AssemblyQualifiedName + ServerFactory = "Microsoft.Owin.Host.HttpListener" }; - _logger.Info("starting server on {0}", options.Url); + _logger.Info("starting server on {0}", url); - _host = WebApplication.Start(options, BuildApp); + _host = WebApp.Start(options, BuildApp); } private void BuildApp(IAppBuilder appBuilder) { + appBuilder.Properties["host.AppName"] = "NzbDrone"; + foreach (var middleWare in _owinMiddleWares.OrderBy(c => c.Order)) { _logger.Debug("Attaching {0} to host", middleWare.GetType().Name); diff --git a/NzbDrone/packages.config b/NzbDrone/packages.config index 1ee8e77fd..4b7086895 100644 --- a/NzbDrone/packages.config +++ b/NzbDrone/packages.config @@ -1,10 +1,11 @@  - - - - + + + + +