diff --git a/NzbDrone.Api/Bootstrapper.cs b/NzbDrone.Api/Bootstrapper.cs index c4fda1b98..6b0b9dcc6 100644 --- a/NzbDrone.Api/Bootstrapper.cs +++ b/NzbDrone.Api/Bootstrapper.cs @@ -23,7 +23,12 @@ namespace NzbDrone.Api _logger = LogManager.GetCurrentClassLogger(); } - public static void Initialize() + protected override void ApplicationStartup(ILifetimeScope container, IPipelines pipelines) + { + InitializeAutomapper(); + } + + public static void InitializeAutomapper() { //QualityProfiles Mapper.CreateMap() diff --git a/NzbDrone.Core/Datastore/ConnectionFactory.cs b/NzbDrone.Core/Datastore/ConnectionFactory.cs index 7c03e4933..39186f167 100644 --- a/NzbDrone.Core/Datastore/ConnectionFactory.cs +++ b/NzbDrone.Core/Datastore/ConnectionFactory.cs @@ -131,6 +131,11 @@ namespace NzbDrone.Core.Datastore } catch (SqlCeException e) { + if (e.Message.Contains("file sharing violation")) + { + logger.WarnException("file is in use. skipping.", e); + return; + } logger.WarnException( "Safe recovery failed. will attempts a more aggressive strategy. might case loss of data.", e); diff --git a/NzbDrone.Web/App_Start/Logging.cs b/NzbDrone.Web/App_Start/Logging.cs index 7a53a6b51..86f0f5126 100644 --- a/NzbDrone.Web/App_Start/Logging.cs +++ b/NzbDrone.Web/App_Start/Logging.cs @@ -1,7 +1,5 @@ -using System.IO; using System.Linq; using NLog; -using NLog.Config; using NzbDrone.Common; [assembly: WebActivator.PreApplicationStartMethod(typeof(NzbDrone.Web.App_Start.Logging), "PreStart")] @@ -15,7 +13,7 @@ namespace NzbDrone.Web.App_Start { var environmentProvider = new EnvironmentProvider(); - LogManager.Configuration = new XmlLoggingConfiguration(environmentProvider.GetNlogConfigPath(), false); + //LogManager.Configuration = new XmlLoggingConfiguration(environmentProvider.GetNlogConfigPath(), false); LogConfiguration.RegisterUdpLogger(); LogConfiguration.RegisterRemote(); diff --git a/NzbDrone.Web/Web.config b/NzbDrone.Web/Web.config index f4fbd3b20..93d9c7516 100644 --- a/NzbDrone.Web/Web.config +++ b/NzbDrone.Web/Web.config @@ -41,7 +41,6 @@ -