diff --git a/Identity.sln b/Identity.sln index 1eac0bdf30..0cb74460ed 100644 --- a/Identity.sln +++ b/Identity.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 14 -VisualStudioVersion = 14.0.23107.0 +VisualStudioVersion = 14.0.25123.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0F647068-6602-4E24-B1DC-8ED91481A50A}" EndProject @@ -27,6 +27,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Identi EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Identity.EntityFrameworkCore", "src\Microsoft.AspNetCore.Identity.EntityFrameworkCore\Microsoft.AspNetCore.Identity.EntityFrameworkCore.xproj", "{4490894C-3572-4E63-86F1-EE5105CE8A06}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Interop4.5", "samples\Interop4.5\Interop4.5.csproj", "{4D30B14B-20FC-4DDA-97C5-B32D13FE2578}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNet.Identity.CoreCompat", "src\Microsoft.AspNet.Identity.CoreCompat\Microsoft.AspNet.Identity.CoreCompat.xproj", "{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -107,6 +111,30 @@ Global {4490894C-3572-4E63-86F1-EE5105CE8A06}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {4490894C-3572-4E63-86F1-EE5105CE8A06}.Release|Mixed Platforms.Build.0 = Release|Any CPU {4490894C-3572-4E63-86F1-EE5105CE8A06}.Release|x86.ActiveCfg = Release|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Debug|x86.ActiveCfg = Debug|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Debug|x86.Build.0 = Debug|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Release|Any CPU.Build.0 = Release|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Release|x86.ActiveCfg = Release|Any CPU + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578}.Release|x86.Build.0 = Release|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|Any CPU.Build.0 = Debug|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|x86.ActiveCfg = Debug|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|x86.Build.0 = Debug|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|Any CPU.ActiveCfg = Release|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|Any CPU.Build.0 = Release|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|x86.ActiveCfg = Release|Any CPU + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -119,5 +147,7 @@ Global {37236EA3-915D-46D5-997C-DF513C500E4B} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E} {EA7EB28F-53B8-4009-9C6B-74DB090CA8DD} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E} {4490894C-3572-4E63-86F1-EE5105CE8A06} = {0F647068-6602-4E24-B1DC-8ED91481A50A} + {4D30B14B-20FC-4DDA-97C5-B32D13FE2578} = {58D94A0E-C2B7-43A7-8826-99ECBB1E0A50} + {6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475} = {0F647068-6602-4E24-B1DC-8ED91481A50A} EndGlobalSection EndGlobal diff --git a/NuGet.config b/NuGet.config index 52bf414192..5500f6d507 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,4 +1,4 @@ - + diff --git a/samples/IdentitySample.Mvc/Models/ApplicationDbContext.cs b/samples/IdentitySample.Mvc/Models/ApplicationDbContext.cs index 50a6911a74..902414c46c 100644 --- a/samples/IdentitySample.Mvc/Models/ApplicationDbContext.cs +++ b/samples/IdentitySample.Mvc/Models/ApplicationDbContext.cs @@ -9,6 +9,8 @@ namespace IdentitySample.Models { public class ApplicationDbContext : IdentityDbContext { + public ApplicationDbContext(DbContextOptions options) : base(options) { } + protected override void OnModelCreating(ModelBuilder builder) { base.OnModelCreating(builder); diff --git a/samples/IdentitySample.Mvc/Program.cs b/samples/IdentitySample.Mvc/Program.cs new file mode 100644 index 0000000000..b186e6812d --- /dev/null +++ b/samples/IdentitySample.Mvc/Program.cs @@ -0,0 +1,24 @@ +using System.IO; +using Microsoft.AspNetCore.Hosting; +using Microsoft.Extensions.Configuration; + +namespace IdentitySample +{ + public static class Program + { + public static void Main(string[] args) + { + var config = new ConfigurationBuilder().AddEnvironmentVariables("ASPNETCORE_").Build(); + + var host = new WebHostBuilder() + .UseKestrel() + .UseConfiguration(config) + .UseContentRoot(Directory.GetCurrentDirectory()) + .UseIISIntegration() + .UseStartup() + .Build(); + + host.Run(); + } + } +} \ No newline at end of file diff --git a/samples/IdentitySample.Mvc/Properties/launchSettings.json b/samples/IdentitySample.Mvc/Properties/launchSettings.json index cf11afc04f..485fe8532f 100644 --- a/samples/IdentitySample.Mvc/Properties/launchSettings.json +++ b/samples/IdentitySample.Mvc/Properties/launchSettings.json @@ -14,6 +14,12 @@ "environmentVariables": { "ASPNET_ENVIRONMENT": "Development" } + }, + "web": { + "commandName": "web", + "environmentVariables": { + "ASPNET_ENVIRONMENT": "Development" + } } } } \ No newline at end of file diff --git a/samples/IdentitySample.Mvc/Startup.cs b/samples/IdentitySample.Mvc/Startup.cs index 8d0a690e0f..91a0a774e4 100644 --- a/samples/IdentitySample.Mvc/Startup.cs +++ b/samples/IdentitySample.Mvc/Startup.cs @@ -23,6 +23,7 @@ namespace IdentitySample { // Set up configuration sources. var builder = new ConfigurationBuilder() + .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json") .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true); @@ -47,8 +48,8 @@ namespace IdentitySample services.AddIdentity(options => { options.Cookies.ApplicationCookie.AuthenticationScheme = "ApplicationCookie"; - options.Cookies.ApplicationCookie.DataProtectionProvider = DataProtectionProvider.Create(new DirectoryInfo("C:\\Github\\Identity\\artifacts")); options.Cookies.ApplicationCookie.CookieName = "Interop"; + options.Cookies.ApplicationCookie.DataProtectionProvider = DataProtectionProvider.Create(new DirectoryInfo("C:\\Github\\Identity\\artifacts")); }) .AddEntityFrameworkStores() .AddDefaultTokenProviders(); @@ -114,18 +115,6 @@ namespace IdentitySample template: "{controller=Home}/{action=Index}/{id?}"); }); } - - // Entry point for the application. - public static void Main(string[] args) - { - var host = new WebHostBuilder() - .UseKestrel() - .UseIISIntegration() - .UseStartup() - .Build(); - - host.Run(); - } } } diff --git a/samples/IdentitySample.Mvc/Views/Shared/_Layout.cshtml b/samples/IdentitySample.Mvc/Views/Shared/_Layout.cshtml index f5869ac96a..912a38b7a3 100644 --- a/samples/IdentitySample.Mvc/Views/Shared/_Layout.cshtml +++ b/samples/IdentitySample.Mvc/Views/Shared/_Layout.cshtml @@ -17,7 +17,7 @@ - $safeprojectname$ + Identity Sample