#111 - Remove DataProtectionOptions from the service collection.
This commit is contained in:
parent
b7bb7f8fcf
commit
b44ffdb745
|
|
@ -5,7 +5,6 @@ using System.Collections.Generic;
|
||||||
using Microsoft.AspNet.Hosting.Builder;
|
using Microsoft.AspNet.Hosting.Builder;
|
||||||
using Microsoft.AspNet.Hosting.Server;
|
using Microsoft.AspNet.Hosting.Server;
|
||||||
using Microsoft.AspNet.Hosting.Startup;
|
using Microsoft.AspNet.Hosting.Startup;
|
||||||
using Microsoft.AspNet.Security.DataProtection;
|
|
||||||
using Microsoft.Framework.ConfigurationModel;
|
using Microsoft.Framework.ConfigurationModel;
|
||||||
using Microsoft.Framework.DependencyInjection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
using Microsoft.Framework.Logging;
|
using Microsoft.Framework.Logging;
|
||||||
|
|
@ -46,11 +45,6 @@ namespace Microsoft.AspNet.Hosting
|
||||||
{
|
{
|
||||||
yield return service;
|
yield return service;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var service in DataProtectionServices.GetDefaultServices())
|
|
||||||
{
|
|
||||||
yield return service;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ using System;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNet.Security.DataProtection;
|
|
||||||
using Microsoft.Framework.ConfigurationModel;
|
using Microsoft.Framework.ConfigurationModel;
|
||||||
using Microsoft.Framework.DependencyInjection;
|
using Microsoft.Framework.DependencyInjection;
|
||||||
using Microsoft.Framework.DependencyInjection.Fallback;
|
using Microsoft.Framework.DependencyInjection.Fallback;
|
||||||
|
|
@ -47,13 +46,6 @@ namespace Microsoft.AspNet.Hosting
|
||||||
var serviceCollection = new ServiceCollection();
|
var serviceCollection = new ServiceCollection();
|
||||||
serviceCollection.Add(HostingServices.GetDefaultServices(config));
|
serviceCollection.Add(HostingServices.GetDefaultServices(config));
|
||||||
serviceCollection.AddInstance<IHostingEnvironment>(hostingEnv);
|
serviceCollection.AddInstance<IHostingEnvironment>(hostingEnv);
|
||||||
// The application name is a "good enough" mechanism to identify this application
|
|
||||||
// on the machine and to prevent subkeys from being shared across multiple applications
|
|
||||||
// by default.
|
|
||||||
serviceCollection.Configure<DataProtectionOptions>(options =>
|
|
||||||
{
|
|
||||||
options.ApplicationDiscriminator = appEnv.ApplicationName;
|
|
||||||
});
|
|
||||||
|
|
||||||
var services = serviceCollection.BuildServiceProvider(_serviceProvider);
|
var services = serviceCollection.BuildServiceProvider(_serviceProvider);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@
|
||||||
"description": "ASP.NET 5 core hosting infrastructure and startup logic for web applications.",
|
"description": "ASP.NET 5 core hosting infrastructure and startup logic for web applications.",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"Microsoft.AspNet.PipelineCore": "1.0.0-*",
|
"Microsoft.AspNet.PipelineCore": "1.0.0-*",
|
||||||
"Microsoft.AspNet.Security.DataProtection": "1.0.0-*",
|
|
||||||
"Microsoft.Framework.Logging": "1.0.0-*",
|
"Microsoft.Framework.Logging": "1.0.0-*",
|
||||||
"Microsoft.Framework.OptionsModel": "1.0.0-*",
|
"Microsoft.Framework.OptionsModel": "1.0.0-*",
|
||||||
"Microsoft.Framework.Runtime.Interfaces": { "version": "1.0.0-*", "type": "build" },
|
"Microsoft.Framework.Runtime.Interfaces": { "version": "1.0.0-*", "type": "build" },
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue