diff --git a/samples/IdentitySample.Mvc/Startup.cs b/samples/IdentitySample.Mvc/Startup.cs index 67fc66955c..0b4cbcc703 100644 --- a/samples/IdentitySample.Mvc/Startup.cs +++ b/samples/IdentitySample.Mvc/Startup.cs @@ -5,7 +5,6 @@ using Microsoft.Data.Entity; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; -using Microsoft.Dnx.Runtime; #if DNX451 using NLog.Config; using NLog.Targets; @@ -15,14 +14,13 @@ namespace IdentitySamples { public partial class Startup { - public Startup(IApplicationEnvironment env) + public Startup() { /* * Below code demonstrates usage of multiple configuration sources. For instance a setting say 'setting1' is found in both the registered sources, * then the later source will win. By this way a Local config can be overridden by a different setting while deployed remotely. */ var builder = new ConfigurationBuilder() - .SetBasePath(env.ApplicationBasePath) .AddJsonFile("LocalConfig.json") .AddEnvironmentVariables(); //All environment variables in the process's context flow in as configuration values. diff --git a/test/Microsoft.AspNet.Identity.EntityFramework.Test/DefaultPocoTest.cs b/test/Microsoft.AspNet.Identity.EntityFramework.Test/DefaultPocoTest.cs index f334cac750..af691199d5 100644 --- a/test/Microsoft.AspNet.Identity.EntityFramework.Test/DefaultPocoTest.cs +++ b/test/Microsoft.AspNet.Identity.EntityFramework.Test/DefaultPocoTest.cs @@ -9,7 +9,6 @@ using Microsoft.AspNet.Builder.Internal; using Microsoft.AspNet.Identity.Test; using Microsoft.Data.Entity; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Dnx.Runtime.Infrastructure; using Xunit; using Microsoft.AspNet.Testing.xunit; @@ -54,8 +53,7 @@ namespace Microsoft.AspNet.Identity.EntityFramework.Test private ApplicationBuilder CreateBuilder() { - var builder = new ApplicationBuilder(CallContextServiceLocator.Locator.ServiceProvider); - builder.ApplicationServices = ConfigureServices(); + var builder = new ApplicationBuilder(ConfigureServices()); return builder; } diff --git a/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs b/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs index 245e3a906e..64377debf0 100644 --- a/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs +++ b/test/Microsoft.AspNet.Identity.InMemory.Test/HttpSignInTest.cs @@ -11,7 +11,6 @@ using Microsoft.AspNet.Http; using Microsoft.AspNet.Http.Authentication; using Microsoft.AspNet.Identity.Test; using Microsoft.Extensions.DependencyInjection; -using Microsoft.Dnx.Runtime.Infrastructure; using Moq; using Xunit; @@ -24,9 +23,6 @@ namespace Microsoft.AspNet.Identity.InMemory.Test [InlineData(false)] public async Task VerifyAccountControllerSignIn(bool isPersistent) { - var app = new ApplicationBuilder(CallContextServiceLocator.Locator.ServiceProvider); - app.UseCookieAuthentication(); - var context = new Mock(); var auth = new Mock(); context.Setup(c => c.Authentication).Returns(auth.Object).Verifiable(); @@ -43,7 +39,9 @@ namespace Microsoft.AspNet.Identity.InMemory.Test services.AddIdentity(); services.AddSingleton, InMemoryUserStore>(); services.AddSingleton, InMemoryRoleStore>(); - app.ApplicationServices = services.BuildServiceProvider(); + + var app = new ApplicationBuilder(services.BuildServiceProvider()); + app.UseCookieAuthentication(); // Act var user = new TestUser