Add Interop 45 Compat package

Initial samples fixes (more coming to make things work)
This commit is contained in:
Hao Kung 2016-05-23 13:23:32 -07:00
parent 104f216191
commit e0676292fc
94 changed files with 460 additions and 316 deletions

View File

@ -1,6 +1,6 @@
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14 # Visual Studio 14
VisualStudioVersion = 14.0.23107.0 VisualStudioVersion = 14.0.25123.0
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0F647068-6602-4E24-B1DC-8ED91481A50A}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{0F647068-6602-4E24-B1DC-8ED91481A50A}"
EndProject EndProject
@ -27,6 +27,10 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Microsoft.AspNetCore.Identi
EndProject 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}" 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 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 Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU 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.ActiveCfg = Release|Any CPU
{4490894C-3572-4E63-86F1-EE5105CE8A06}.Release|Mixed Platforms.Build.0 = 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 {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 EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -119,5 +147,7 @@ Global
{37236EA3-915D-46D5-997C-DF513C500E4B} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E} {37236EA3-915D-46D5-997C-DF513C500E4B} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E}
{EA7EB28F-53B8-4009-9C6B-74DB090CA8DD} = {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} {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 EndGlobalSection
EndGlobal EndGlobal

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<packageSources> <packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" /> <add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />

View File

@ -9,6 +9,8 @@ namespace IdentitySample.Models
{ {
public class ApplicationDbContext : IdentityDbContext<ApplicationUser> public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{ {
public ApplicationDbContext(DbContextOptions options) : base(options) { }
protected override void OnModelCreating(ModelBuilder builder) protected override void OnModelCreating(ModelBuilder builder)
{ {
base.OnModelCreating(builder); base.OnModelCreating(builder);

View File

@ -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<Startup>()
.Build();
host.Run();
}
}
}

View File

@ -14,6 +14,12 @@
"environmentVariables": { "environmentVariables": {
"ASPNET_ENVIRONMENT": "Development" "ASPNET_ENVIRONMENT": "Development"
} }
},
"web": {
"commandName": "web",
"environmentVariables": {
"ASPNET_ENVIRONMENT": "Development"
}
} }
} }
} }

View File

@ -23,6 +23,7 @@ namespace IdentitySample
{ {
// Set up configuration sources. // Set up configuration sources.
var builder = new ConfigurationBuilder() var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json") .AddJsonFile("appsettings.json")
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true); .AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
@ -47,8 +48,8 @@ namespace IdentitySample
services.AddIdentity<ApplicationUser, IdentityRole>(options => { services.AddIdentity<ApplicationUser, IdentityRole>(options => {
options.Cookies.ApplicationCookie.AuthenticationScheme = "ApplicationCookie"; 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.CookieName = "Interop";
options.Cookies.ApplicationCookie.DataProtectionProvider = DataProtectionProvider.Create(new DirectoryInfo("C:\\Github\\Identity\\artifacts"));
}) })
.AddEntityFrameworkStores<ApplicationDbContext>() .AddEntityFrameworkStores<ApplicationDbContext>()
.AddDefaultTokenProviders(); .AddDefaultTokenProviders();
@ -114,18 +115,6 @@ namespace IdentitySample
template: "{controller=Home}/{action=Index}/{id?}"); template: "{controller=Home}/{action=Index}/{id?}");
}); });
} }
// Entry point for the application.
public static void Main(string[] args)
{
var host = new WebHostBuilder()
.UseKestrel()
.UseIISIntegration()
.UseStartup<Startup>()
.Build();
host.Run();
}
} }
} }

View File

@ -17,7 +17,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span>
<span class="icon-bar"></span> <span class="icon-bar"></span>
</button> </button>
<a asp-controller="Home" asp-action="Index" class="navbar-brand">$safeprojectname$</a> <a asp-controller="Home" asp-action="Index" class="navbar-brand">Identity Sample</a>
</div> </div>
<div class="navbar-collapse collapse"> <div class="navbar-collapse collapse">
<ul class="nav navbar-nav"> <ul class="nav navbar-nav">

View File

@ -1,7 +1,7 @@
{ {
"Data": { "Data": {
"DefaultConnection": { "DefaultConnection": {
"ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=Interop11-23;Trusted_Connection=True;MultipleActiveResultSets=true" "ConnectionString": "Server=(localdb)\\mssqllocaldb;Database=Interop-Shared;Trusted_Connection=True;MultipleActiveResultSets=true"
} }
}, },
"Logging": { "Logging": {

View File

@ -33,7 +33,8 @@
"Microsoft.Extensions.Logging.Debug": "1.0.0-*" "Microsoft.Extensions.Logging.Debug": "1.0.0-*"
}, },
"buildOptions": { "buildOptions": {
"emitEntryPoint": true "emitEntryPoint": true,
"preserveCompilationContext": true
}, },
"frameworks": { "frameworks": {
"net451": {}, "net451": {},

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on using web.config transformation visit http://go.microsoft.com/fwlink/?LinkId=125889 -->
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<!--
In the example below, the "SetAttributes" transform will change the value of
"connectionString" to use "ReleaseSQLServer" only when the "Match" locator
finds an attribute "name" that has a value of "MyDB".
<connectionStrings>
<add name="MyDB"
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True"
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/>
</connectionStrings>
-->
<system.web>
<compilation xdt:Transform="RemoveAttributes(debug)" />
<!--
In the example below, the "Replace" transform will replace the entire
<customErrors> section of your web.config file.
Note that because there is only one customErrors section under the
<system.web> node, there is no need to use the "xdt:Locator" attribute.
<customErrors defaultRedirect="GenericError.htm"
mode="RemoteOnly" xdt:Transform="Replace">
<error statusCode="500" redirect="InternalError.htm"/>
</customErrors>
-->
</system.web>
</configuration>

View File

@ -1,7 +1,7 @@
using System.Web; using System.Web;
using System.Web.Optimization; using System.Web.Optimization;
namespace Interop45 namespace Interop4._5
{ {
public class BundleConfig public class BundleConfig
{ {

View File

@ -1,7 +1,7 @@
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
namespace Interop45 namespace Interop4._5
{ {
public class FilterConfig public class FilterConfig
{ {

View File

@ -1,19 +1,18 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data.Entity; using System.Data.Entity;
using System.Linq; using System.Linq;
using System.Security.Claims; using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web; using System.Web;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNet.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.AspNet.Identity.EntityFramework;
using Microsoft.AspNetCore.Identity.Owin; using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin; using Microsoft.Owin;
using Microsoft.Owin.Security; using Microsoft.Owin.Security;
using Interop45.Models; using Interop4._5.Models;
using Microsoft.AspNetCore.Identity.Compat;
namespace Interop45 namespace Interop4._5
{ {
public class EmailService : IIdentityMessageService public class EmailService : IIdentityMessageService
{ {
@ -43,7 +42,7 @@ namespace Interop45
public static ApplicationUserManager Create(IdentityFactoryOptions<ApplicationUserManager> options, IOwinContext context) public static ApplicationUserManager Create(IdentityFactoryOptions<ApplicationUserManager> options, IOwinContext context)
{ {
var manager = new ApplicationUserManager(new IdentityUserStore<ApplicationUser>(context.Get<ApplicationDbContext>())); var manager = new ApplicationUserManager(new UserStore<ApplicationUser>(context.Get<ApplicationDbContext>()));
// Configure validation logic for usernames // Configure validation logic for usernames
manager.UserValidator = new UserValidator<ApplicationUser>(manager) manager.UserValidator = new UserValidator<ApplicationUser>(manager)
{ {

View File

@ -5,7 +5,7 @@ using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using System.Web.Routing; using System.Web.Routing;
namespace Interop45 namespace Interop4._5
{ {
public class RouteConfig public class RouteConfig
{ {

View File

@ -1,14 +1,13 @@
using System; using System;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNet.Identity;
using Microsoft.AspNetCore.Identity.Owin; using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin; using Microsoft.Owin;
using Microsoft.Owin.Security.Cookies; using Microsoft.Owin.Security.Cookies;
using Owin; using Owin;
using Interop45.Models; using Interop4._5.Models;
using Microsoft.AspNetCore.DataProtection;
using System.IO; using System.IO;
namespace Interop45 namespace Interop4._5
{ {
public partial class Startup public partial class Startup
{ {
@ -26,8 +25,8 @@ namespace Interop45
app.UseCookieAuthentication(new CookieAuthenticationOptions app.UseCookieAuthentication(new CookieAuthenticationOptions
{ {
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie, AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString("/Account/Login"),
CookieName = "Interop", CookieName = "Interop",
LoginPath = new PathString("/Account/Login"),
Provider = new CookieAuthenticationProvider Provider = new CookieAuthenticationProvider
{ {
// Enables the application to validate the security stamp when the user logs in. // Enables the application to validate the security stamp when the user logs in.
@ -35,8 +34,9 @@ namespace Interop45
OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>( OnValidateIdentity = SecurityStampValidator.OnValidateIdentity<ApplicationUserManager, ApplicationUser>(
validateInterval: TimeSpan.FromMinutes(30), validateInterval: TimeSpan.FromMinutes(30),
regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager)) regenerateIdentity: (manager, user) => user.GenerateUserIdentityAsync(manager))
} },
}, new DataProtectionProvider(new DirectoryInfo("C:\\Github\\Identity\\artifacts"))); TicketDataFormat = CookieInterop.CreateSharedDataFormat(new DirectoryInfo("C:\\Github\\Identity\\artifacts"), DefaultAuthenticationTypes.ApplicationCookie)
});
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie); app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
// Enables the application to temporarily store user information when they are verifying the second factor in the two-factor authentication process. // Enables the application to temporarily store user information when they are verifying the second factor in the two-factor authentication process.
@ -67,4 +67,24 @@ namespace Interop45
//}); //});
} }
} }
} }
// Temporary Copy from CookieInterop in CoreCompat, samples should reference that
namespace Owin
{
using System.IO;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Interop;
public static class CookieInterop
{
public static ISecureDataFormat<AuthenticationTicket> CreateSharedDataFormat(DirectoryInfo keyDirectory, string authenticationType)
{
var dataProtector = DataProtectionProvider.Create(keyDirectory)
.CreateProtector("Microsoft.AspNet.Authentication.Cookies.CookieAuthenticationMiddleware", // full name of the ASP.NET 5 type
authenticationType, "v2");
return new AspNetTicketDataFormat(new DataProtectorShim(dataProtector));
}
}
}

View File

@ -1,16 +1,16 @@
using System; using System;
using System.Globalization; using System.Globalization;
using System.Linq; using System.Linq;
using System.Security.Claims; using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNet.Identity;
using Microsoft.AspNetCore.Identity.Owin; using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security; using Microsoft.Owin.Security;
using Interop45.Models; using Interop4._5.Models;
namespace Interop45.Controllers namespace Interop4._5.Controllers
{ {
[Authorize] [Authorize]
public class AccountController : Controller public class AccountController : Controller

View File

@ -4,7 +4,7 @@ using System.Linq;
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
namespace Interop45.Controllers namespace Interop4._5.Controllers
{ {
public class HomeController : Controller public class HomeController : Controller
{ {

View File

@ -1,14 +1,14 @@
using System; using System;
using System.Linq; using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Web; using System.Web;
using System.Web.Mvc; using System.Web.Mvc;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNet.Identity;
using Microsoft.AspNetCore.Identity.Owin; using Microsoft.AspNet.Identity.Owin;
using Microsoft.Owin.Security; using Microsoft.Owin.Security;
using Interop45.Models; using Interop4._5.Models;
namespace Interop45.Controllers namespace Interop4._5.Controllers
{ {
[Authorize] [Authorize]
public class ManageController : Controller public class ManageController : Controller
@ -195,7 +195,7 @@ namespace Interop45.Controllers
} }
// //
// GET: /Manage/RemovePhoneNumber // POST: /Manage/RemovePhoneNumber
[HttpPost] [HttpPost]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public async Task<ActionResult> RemovePhoneNumber() public async Task<ActionResult> RemovePhoneNumber()

View File

@ -1 +1 @@
<%@ Application Codebehind="Global.asax.cs" Inherits="Interop45.MvcApplication" Language="C#" %> <%@ Application Codebehind="Global.asax.cs" Inherits="Interop4._5.MvcApplication" Language="C#" %>

View File

@ -6,7 +6,7 @@ using System.Web.Mvc;
using System.Web.Optimization; using System.Web.Optimization;
using System.Web.Routing; using System.Web.Routing;
namespace Interop45 namespace Interop4._5
{ {
public class MvcApplication : System.Web.HttpApplication public class MvcApplication : System.Web.HttpApplication
{ {

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" /> <Import Project="..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\build\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" />
<Import Project="..\..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" /> <Import Project="..\..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props" Condition="Exists('..\..\packages\Microsoft.Net.Compilers.1.0.0\build\Microsoft.Net.Compilers.props')" />
@ -9,13 +9,13 @@
<ProductVersion> <ProductVersion>
</ProductVersion> </ProductVersion>
<SchemaVersion>2.0</SchemaVersion> <SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9A46D74F-8347-4821-A888-8DA0844443EF}</ProjectGuid> <ProjectGuid>{4D30B14B-20FC-4DDA-97C5-B32D13FE2578}</ProjectGuid>
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder> <AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Interop45</RootNamespace> <RootNamespace>Interop4._5</RootNamespace>
<AssemblyName>Interop45</AssemblyName> <AssemblyName>Interop4.5</AssemblyName>
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<MvcBuildViews>false</MvcBuildViews> <MvcBuildViews>false</MvcBuildViews>
<UseIISExpress>true</UseIISExpress> <UseIISExpress>true</UseIISExpress>
<IISExpressSSLPort /> <IISExpressSSLPort />
@ -45,20 +45,20 @@
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.AspNetCore.Cryptography.Internal, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.AspNetCore.Cryptography.Internal, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNetCore.Cryptography.Internal.1.0.0-rc2-15760\lib\net451\Microsoft.AspNetCore.Cryptography.Internal.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNetCore.Cryptography.Internal.1.0.0-rc3-20677\lib\net451\Microsoft.AspNetCore.Cryptography.Internal.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.AspNetCore.DataProtection, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.AspNetCore.DataProtection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNetCore.DataProtection.1.0.0-rc2-15760\lib\net451\Microsoft.AspNetCore.DataProtection.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNetCore.DataProtection.1.0.0-rc3-20677\lib\net451\Microsoft.AspNetCore.DataProtection.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.AspNetCore.DataProtection.Abstractions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.AspNetCore.DataProtection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNetCore.DataProtection.Abstractions.1.0.0-rc2-15760\lib\net451\Microsoft.AspNetCore.DataProtection.Abstractions.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNetCore.DataProtection.Abstractions.1.0.0-rc3-20677\lib\net451\Microsoft.AspNetCore.DataProtection.Abstractions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.AspNetCore.DataProtection.Extensions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.AspNetCore.DataProtection.Extensions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.AspNetCore.DataProtection.Extensions.1.0.0-rc2-15760\lib\net451\Microsoft.AspNetCore.DataProtection.Extensions.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNetCore.DataProtection.Extensions.1.0.0-rc3-20677\lib\net451\Microsoft.AspNetCore.DataProtection.Extensions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
@ -66,59 +66,48 @@
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Extensions.Configuration, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.Extensions.DependencyInjection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.1.0.0-rc2-15779\lib\net451\Microsoft.Extensions.Configuration.dll</HintPath> <HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.1.0.0-rc3-20677\lib\netstandard1.1\Microsoft.Extensions.DependencyInjection.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Abstractions.1.0.0-rc2-15779\lib\net451\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath> <HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0-rc3-20677\lib\netstandard1.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.Configuration.Binder.1.0.0-rc2-15779\lib\net451\Microsoft.Extensions.Configuration.Binder.dll</HintPath> <HintPath>..\..\packages\Microsoft.Extensions.Logging.Abstractions.1.0.0-rc3-20677\lib\netstandard1.1\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.Extensions.Options, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.1.0.0-rc2-15748\lib\net451\Microsoft.Extensions.DependencyInjection.dll</HintPath> <HintPath>..\..\packages\Microsoft.Extensions.Options.1.0.0-rc3-20677\lib\netstandard1.0\Microsoft.Extensions.Options.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.Extensions.PlatformAbstractions, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.1.0.0-rc2-15748\lib\net451\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath> <HintPath>..\..\packages\Microsoft.Extensions.PlatformAbstractions.1.0.0-rc3-20677\lib\net451\Microsoft.Extensions.PlatformAbstractions.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.Extensions.Primitives, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.Logging.Abstractions.1.0.0-rc2-15757\lib\net451\Microsoft.Extensions.Logging.Abstractions.dll</HintPath> <HintPath>..\..\packages\Microsoft.Extensions.Primitives.1.0.0-rc3-20677\lib\netstandard1.0\Microsoft.Extensions.Primitives.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="Microsoft.Extensions.OptionsModel, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="Microsoft.Owin.Security.Interop, Version=1.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.OptionsModel.1.0.0-rc2-15753\lib\net451\Microsoft.Extensions.OptionsModel.dll</HintPath> <HintPath>..\..\packages\Microsoft.Owin.Security.Interop.1.0.0-rc3-20677\lib\net451\Microsoft.Owin.Security.Interop.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Extensions.PlatformAbstractions, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.PlatformAbstractions.1.0.0-rc2-16062\lib\net451\Microsoft.Extensions.PlatformAbstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Extensions.Primitives, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Extensions.Primitives.1.0.0-rc2-15802\lib\net451\Microsoft.Extensions.Primitives.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.Owin.Security.Cookies.Interop, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\packages\Microsoft.Owin.Security.Cookies.Interop.1.0.0-t151023210157\lib\net451\Microsoft.Owin.Security.Cookies.Interop.dll</HintPath>
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Data" /> <Reference Include="System.Data" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Drawing" /> <Reference Include="System.Drawing" />
<Reference Include="System.IO" />
<Reference Include="System.Security" /> <Reference Include="System.Security" />
<Reference Include="System.Web.DynamicData" /> <Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" /> <Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" /> <Reference Include="System.Web.ApplicationServices" />
<Reference Include="System.ComponentModel.DataAnnotations" /> <Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Core" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Web" /> <Reference Include="System.Web" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
<Reference Include="System.Web.Abstractions" />
<Reference Include="System.Web.Routing" /> <Reference Include="System.Web.Routing" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
@ -134,32 +123,31 @@
</Reference> </Reference>
<Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Web.Helpers, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private> <Private>True</Private>
<HintPath>..\..\packages\Microsoft.AspNetCore.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.Helpers.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Web.Mvc, Version=5.2.3.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private> <Private>True</Private>
<HintPath>..\..\packages\Microsoft.AspNetCore.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.Mvc.5.2.3\lib\net45\System.Web.Mvc.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Web.Optimization"> <Reference Include="System.Web.Optimization">
<HintPath>..\..\packages\Microsoft.AspNetCore.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.Web.Optimization.1.1.3\lib\net40\System.Web.Optimization.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Web.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private> <Private>True</Private>
<HintPath>..\..\packages\Microsoft.AspNetCore.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.Razor.3.2.3\lib\net45\System.Web.Razor.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Web.WebPages, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private> <Private>True</Private>
<HintPath>..\..\packages\Microsoft.AspNetCore.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Web.WebPages.Deployment, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private> <Private>True</Private>
<HintPath>..\..\packages\Microsoft.AspNetCore.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Deployment.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <Reference Include="System.Web.WebPages.Razor, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private> <Private>True</Private>
<HintPath>..\..\packages\Microsoft.AspNetCore.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.WebPages.3.2.3\lib\net45\System.Web.WebPages.Razor.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Xml.Linq" />
<Reference Include="WebGrease"> <Reference Include="WebGrease">
<Private>True</Private> <Private>True</Private>
<HintPath>..\..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath> <HintPath>..\..\packages\WebGrease.1.5.2\lib\WebGrease.dll</HintPath>
@ -174,19 +162,19 @@
<HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath> <HintPath>..\..\packages\Newtonsoft.Json.6.0.4\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference> </Reference>
<Reference Include="EntityFramework"> <Reference Include="EntityFramework">
<HintPath>..\..\packages\Microsoft.EntityFrameworkCore.6.1.3\lib\net45\Microsoft.EntityFrameworkCore.dll</HintPath> <HintPath>..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.EntityFrameworkCore.SqlServer"> <Reference Include="EntityFramework.SqlServer">
<HintPath>..\..\packages\Microsoft.EntityFrameworkCore.6.1.3\lib\net45\Microsoft.EntityFrameworkCore.SqlServer.dll</HintPath> <HintPath>..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.AspNetCore.Identity.Core"> <Reference Include="Microsoft.AspNet.Identity.Core">
<HintPath>..\..\packages\Microsoft.AspNetCore.Identity.Core.2.2.1\lib\net45\Microsoft.AspNetCore.Identity.Core.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.Identity.Core.2.2.1\lib\net45\Microsoft.AspNet.Identity.Core.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.AspNetCore.Identity.Owin"> <Reference Include="Microsoft.AspNet.Identity.Owin">
<HintPath>..\..\packages\Microsoft.AspNetCore.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNetCore.Identity.Owin.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.Identity.Owin.2.2.1\lib\net45\Microsoft.AspNet.Identity.Owin.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore"> <Reference Include="Microsoft.AspNet.Identity.EntityFramework">
<HintPath>..\..\packages\Microsoft.AspNetCore.Identity.EntityFrameworkCore.2.2.1\lib\net45\Microsoft.AspNetCore.Identity.EntityFrameworkCore.dll</HintPath> <HintPath>..\..\packages\Microsoft.AspNet.Identity.EntityFramework.2.2.1\lib\net45\Microsoft.AspNet.Identity.EntityFramework.dll</HintPath>
</Reference> </Reference>
<Reference Include="Owin"> <Reference Include="Owin">
<HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath> <HintPath>..\..\packages\Owin.1.0\lib\net40\Owin.dll</HintPath>
@ -225,35 +213,12 @@
<Compile Include="App_Start\IdentityConfig.cs" /> <Compile Include="App_Start\IdentityConfig.cs" />
<Compile Include="App_Start\RouteConfig.cs" /> <Compile Include="App_Start\RouteConfig.cs" />
<Compile Include="App_Start\Startup.Auth.cs" /> <Compile Include="App_Start\Startup.Auth.cs" />
<Compile Include="Compat\CompatDbContext.cs" />
<Compile Include="Compat\CompatRole.cs" />
<Compile Include="Compat\CompatRoleClaim.cs" />
<Compile Include="Compat\CompatUser.cs" />
<Compile Include="Compat\CompatUserLogin.cs" />
<Compile Include="Compat\CompatUserStore.cs" />
<Compile Include="Controllers\AccountController.cs" /> <Compile Include="Controllers\AccountController.cs" />
<Compile Include="Controllers\HomeController.cs" /> <Compile Include="Controllers\HomeController.cs" />
<Compile Include="Controllers\ManageController.cs" /> <Compile Include="Controllers\ManageController.cs" />
<Compile Include="Global.asax.cs"> <Compile Include="Global.asax.cs">
<DependentUpon>Global.asax</DependentUpon> <DependentUpon>Global.asax</DependentUpon>
</Compile> </Compile>
<Compile Include="Migrations\201511031830242_InitialCreate.cs" />
<Compile Include="Migrations\201511031830242_InitialCreate.Designer.cs">
<DependentUpon>201511031830242_InitialCreate.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201511232040531_Identity3Migration.cs" />
<Compile Include="Migrations\201511232040531_Identity3Migration.Designer.cs">
<DependentUpon>201511232040531_Identity3Migration.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201511232057540_IdentityV3Schema.cs" />
<Compile Include="Migrations\201511232057540_IdentityV3Schema.Designer.cs">
<DependentUpon>201511232057540_IdentityV3Schema.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\201511232103169_Identity3Migration1.cs" />
<Compile Include="Migrations\201511232103169_Identity3Migration1.Designer.cs">
<DependentUpon>201511232103169_Identity3Migration1.cs</DependentUpon>
</Compile>
<Compile Include="Migrations\Configuration.cs" />
<Compile Include="Models\AccountViewModels.cs" /> <Compile Include="Models\AccountViewModels.cs" />
<Compile Include="Models\IdentityModels.cs" /> <Compile Include="Models\IdentityModels.cs" />
<Compile Include="Models\ManageViewModels.cs" /> <Compile Include="Models\ManageViewModels.cs" />
@ -328,18 +293,10 @@
<Content Include="Scripts\jquery-1.10.2.min.map" /> <Content Include="Scripts\jquery-1.10.2.min.map" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Include="Migrations\201511031830242_InitialCreate.resx"> <ProjectReference Include="..\..\src\Microsoft.AspNet.Identity.CoreCompat\Microsoft.AspNet.Identity.CoreCompat.xproj">
<DependentUpon>201511031830242_InitialCreate.cs</DependentUpon> <Project>{6a74c6ea-b241-4d6b-bce4-bf89ec1d2475}</Project>
</EmbeddedResource> <Name>Microsoft.AspNet.Identity.CoreCompat</Name>
<EmbeddedResource Include="Migrations\201511232040531_Identity3Migration.resx"> </ProjectReference>
<DependentUpon>201511232040531_Identity3Migration.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201511232057540_IdentityV3Schema.resx">
<DependentUpon>201511232057540_IdentityV3Schema.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Migrations\201511232103169_Identity3Migration1.resx">
<DependentUpon>201511232103169_Identity3Migration1.cs</DependentUpon>
</EmbeddedResource>
</ItemGroup> </ItemGroup>
<PropertyGroup> <PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> <VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion>
@ -357,9 +314,9 @@
<WebProjectProperties> <WebProjectProperties>
<UseIIS>True</UseIIS> <UseIIS>True</UseIIS>
<AutoAssignPort>True</AutoAssignPort> <AutoAssignPort>True</AutoAssignPort>
<DevelopmentServerPort>64848</DevelopmentServerPort> <DevelopmentServerPort>25633</DevelopmentServerPort>
<DevelopmentServerVPath>/</DevelopmentServerVPath> <DevelopmentServerVPath>/</DevelopmentServerVPath>
<IISUrl>http://localhost:64848/</IISUrl> <IISUrl>http://localhost:25633/</IISUrl>
<NTLMAuthentication>False</NTLMAuthentication> <NTLMAuthentication>False</NTLMAuthentication>
<UseCustomServer>False</UseCustomServer> <UseCustomServer>False</UseCustomServer>
<CustomServerUrl> <CustomServerUrl>

View File

@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
namespace Interop45.Models namespace Interop4._5.Models
{ {
public class ExternalLoginConfirmationViewModel public class ExternalLoginConfirmationViewModel
{ {

View File

@ -1,9 +1,10 @@
using System.Data.Entity;
using System.Security.Claims; using System.Security.Claims;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNet.Identity;
using Microsoft.AspNetCore.Identity.Compat; using Microsoft.AspNet.Identity.EntityFramework;
namespace Interop45.Models namespace Interop4._5.Models
{ {
// You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more. // You can add profile data for the user by adding more properties to your ApplicationUser class, please visit http://go.microsoft.com/fwlink/?LinkID=317594 to learn more.
public class ApplicationUser : IdentityUser public class ApplicationUser : IdentityUser
@ -20,7 +21,7 @@ namespace Interop45.Models
public class ApplicationDbContext : IdentityDbContext<ApplicationUser> public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
{ {
public ApplicationDbContext() public ApplicationDbContext()
: base("DefaultConnection") : base("DefaultConnection", throwIfV1Schema: false)
{ {
} }

View File

@ -1,9 +1,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Identity; using Microsoft.AspNet.Identity;
using Microsoft.Owin.Security; using Microsoft.Owin.Security;
namespace Interop45.Models namespace Interop4._5.Models
{ {
public class IndexViewModel public class IndexViewModel
{ {

View File

@ -5,12 +5,12 @@ using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following // General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information // set of attributes. Change these attribute values to modify the information
// associated with an assembly. // associated with an assembly.
[assembly: AssemblyTitle("Interop45")] [assembly: AssemblyTitle("Interop4._5")]
[assembly: AssemblyDescription("")] [assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")] [assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")] [assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Interop45")] [assembly: AssemblyProduct("Interop4._5")]
[assembly: AssemblyCopyright("Copyright © 2015")] [assembly: AssemblyCopyright("Copyright © 2016")]
[assembly: AssemblyTrademark("")] [assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")] [assembly: AssemblyCulture("")]
@ -20,7 +20,7 @@ using System.Runtime.InteropServices;
[assembly: ComVisible(false)] [assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM // The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("ee1d4894-00ce-4c3b-a5dd-5a859e15992d")] [assembly: Guid("4503c902-d743-4fef-9d85-7e0393595cd3")]
// Version information for an assembly consists of the following four values: // Version information for an assembly consists of the following four values:
// //

View File

@ -1,18 +1,4 @@
/* NUGET: BEGIN LICENSE TEXT intellisense.annotate(jQuery, {
*
* Microsoft grants you the right to use these script files for the sole
* purpose of either: (i) interacting through your browser with the Microsoft
* website or online service, subject to the applicable licensing or use
* terms; or (ii) using the files as included with a Microsoft product subject
* to that product's license terms. Microsoft reserves all other rights to the
* files not expressly granted by Microsoft, whether by implication, estoppel
* or otherwise. Insofar as a script file is dual licensed under GPL,
* Microsoft neither took the code under GPL nor distributes it thereunder but
* under the terms set out in this paragraph. All notices and licenses
* below are for informational purposes only.
*
* NUGET: END LICENSE TEXT */
intellisense.annotate(jQuery, {
'ajax': function() { 'ajax': function() {
/// <signature> /// <signature>
/// <summary>Perform an asynchronous HTTP (Ajax) request.</summary> /// <summary>Perform an asynchronous HTTP (Ajax) request.</summary>

View File

@ -1,8 +1,8 @@
using Microsoft.Owin; using Microsoft.Owin;
using Owin; using Owin;
[assembly: OwinStartupAttribute(typeof(Interop45.Startup))] [assembly: OwinStartupAttribute(typeof(Interop4._5.Startup))]
namespace Interop45 namespace Interop4._5
{ {
public partial class Startup public partial class Startup
{ {

View File

@ -1,4 +1,4 @@
@model Interop45.Models.ExternalLoginConfirmationViewModel @model Interop4._5.Models.ExternalLoginConfirmationViewModel
@{ @{
ViewBag.Title = "Register"; ViewBag.Title = "Register";
} }

View File

@ -1,4 +1,4 @@
@model Interop45.Models.ForgotPasswordViewModel @model Interop4._5.Models.ForgotPasswordViewModel
@{ @{
ViewBag.Title = "Forgot your password?"; ViewBag.Title = "Forgot your password?";
} }

View File

@ -1,4 +1,4 @@
@using Interop45.Models @using Interop4._5.Models
@model LoginViewModel @model LoginViewModel
@{ @{
ViewBag.Title = "Log in"; ViewBag.Title = "Log in";

View File

@ -1,4 +1,4 @@
@model Interop45.Models.RegisterViewModel @model Interop4._5.Models.RegisterViewModel
@{ @{
ViewBag.Title = "Register"; ViewBag.Title = "Register";
} }

View File

@ -1,4 +1,4 @@
@model Interop45.Models.ResetPasswordViewModel @model Interop4._5.Models.ResetPasswordViewModel
@{ @{
ViewBag.Title = "Reset password"; ViewBag.Title = "Reset password";
} }

View File

@ -1,4 +1,4 @@
@model Interop45.Models.SendCodeViewModel @model Interop4._5.Models.SendCodeViewModel
@{ @{
ViewBag.Title = "Send"; ViewBag.Title = "Send";
} }

View File

@ -1,4 +1,4 @@
@model Interop45.Models.VerifyCodeViewModel @model Interop4._5.Models.VerifyCodeViewModel
@{ @{
ViewBag.Title = "Verify"; ViewBag.Title = "Verify";
} }

View File

@ -1,4 +1,4 @@
@model Interop45.Models.ExternalLoginListViewModel @model Interop4._5.Models.ExternalLoginListViewModel
@using Microsoft.Owin.Security @using Microsoft.Owin.Security
<h4>Use another service to log in.</h4> <h4>Use another service to log in.</h4>

View File

@ -1,4 +1,4 @@
@model Interop45.Models.AddPhoneNumberViewModel @model Interop4._5.Models.AddPhoneNumberViewModel
@{ @{
ViewBag.Title = "Phone Number"; ViewBag.Title = "Phone Number";
} }

View File

@ -1,4 +1,4 @@
@model Interop45.Models.ChangePasswordViewModel @model Interop4._5.Models.ChangePasswordViewModel
@{ @{
ViewBag.Title = "Change Password"; ViewBag.Title = "Change Password";
} }

View File

@ -1,4 +1,4 @@
@model Interop45.Models.IndexViewModel @model Interop4._5.Models.IndexViewModel
@{ @{
ViewBag.Title = "Manage"; ViewBag.Title = "Manage";
} }
@ -52,7 +52,7 @@
} }
else else
{ {
<text>[&nbsp;&nbsp;@Html.ActionLink("Add", "AddPhoneNumber")&nbsp;&nbsp;]</text> <text>[&nbsp;&nbsp;@Html.ActionLink("Add", "AddPhoneNumber")
} }
</dd> </dd>
*@ *@

View File

@ -1,4 +1,4 @@
@model Interop45.Models.ManageLoginsViewModel @model Interop4._5.Models.ManageLoginsViewModel
@using Microsoft.Owin.Security @using Microsoft.Owin.Security
@{ @{
ViewBag.Title = "Manage your external logins"; ViewBag.Title = "Manage your external logins";

View File

@ -1,4 +1,4 @@
@model Interop45.Models.SetPasswordViewModel @model Interop4._5.Models.SetPasswordViewModel
@{ @{
ViewBag.Title = "Create Password"; ViewBag.Title = "Create Password";
} }

View File

@ -1,4 +1,4 @@
@model Interop45.Models.VerifyPhoneNumberViewModel @model Interop4._5.Models.VerifyPhoneNumberViewModel
@{ @{
ViewBag.Title = "Verify Phone Number"; ViewBag.Title = "Verify Phone Number";
} }

View File

@ -1,4 +1,4 @@
@using Microsoft.AspNetCore.Identity @using Microsoft.AspNet.Identity
@if (Request.IsAuthenticated) @if (Request.IsAuthenticated)
{ {
using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" })) using (Html.BeginForm("LogOff", "Account", FormMethod.Post, new { id = "logoutForm", @class = "navbar-right" }))

View File

@ -17,7 +17,7 @@
<add namespace="System.Web.Mvc.Html" /> <add namespace="System.Web.Mvc.Html" />
<add namespace="System.Web.Optimization"/> <add namespace="System.Web.Optimization"/>
<add namespace="System.Web.Routing" /> <add namespace="System.Web.Routing" />
<add namespace="Interop45" /> <add namespace="Interop4._5" />
</namespaces> </namespaces>
</pages> </pages>
</system.web.webPages.razor> </system.web.webPages.razor>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!-- <!--
For more information on how to configure your ASP.NET application, please visit For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=301880 http://go.microsoft.com/fwlink/?LinkId=301880
@ -9,7 +9,7 @@
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections> </configSections>
<connectionStrings> <connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Database=Interop11-23;Integrated Security=True" providerName="System.Data.SqlClient" /> <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\MSSQLLocalDB;Database=Interop-Shared;Integrated Security=True" providerName="System.Data.SqlClient" />
</connectionStrings> </connectionStrings>
<appSettings> <appSettings>
<add key="webpages:Version" value="3.0.0.0" /> <add key="webpages:Version" value="3.0.0.0" />
@ -27,7 +27,7 @@
--> -->
<system.web> <system.web>
<authentication mode="None" /> <authentication mode="None" />
<compilation debug="true" targetFramework="4.6" /> <compilation debug="true" targetFramework="4.5.1" />
<httpRuntime targetFramework="4.5" /> <httpRuntime targetFramework="4.5" />
</system.web> </system.web>
<system.webServer> <system.webServer>
@ -82,17 +82,13 @@
<entityFramework> <entityFramework>
<defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" /> <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
<providers> <providers>
<provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, Microsoft.EntityFrameworkCore.SqlServer" /> <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
</providers> </providers>
</entityFramework> </entityFramework>
<system.codedom> <system.codedom>
<compilers> <compilers>
<compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4" compilerOptions="/langversion:5 /nowarn:1659;1699;1701"> <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.CSharpCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:6 /nowarn:1659;1699;1701" />
<providerOption name="CompilerVersion" value="v4.0" /> <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.CodeDom.Providers.DotNetCompilerPlatform.VBCodeProvider, Microsoft.CodeDom.Providers.DotNetCompilerPlatform, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+" />
</compiler>
<compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4" compilerOptions="/langversion:14 /nowarn:41008 /define:_MYTYPE=\&quot;Web\&quot; /optionInfer+">
<providerOption name="CompilerVersion" value="v4.0" />
</compiler>
</compilers> </compilers>
</system.codedom> </system.codedom>
</configuration> </configuration>

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net45" />
<package id="bootstrap" version="3.0.0" targetFramework="net45" />
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
<package id="jQuery" version="1.10.2" targetFramework="net45" />
<package id="jQuery.Validation" version="1.11.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Core" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.EntityFramework" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Identity.Owin" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNet.Mvc" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Razor" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.AspNet.Web.Optimization" version="1.1.3" targetFramework="net45" />
<package id="Microsoft.AspNet.WebPages" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.AspNetCore.Cryptography.Internal" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.AspNetCore.DataProtection" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.AspNetCore.DataProtection.Abstractions" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.AspNetCore.DataProtection.Extensions" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Extensions.DependencyInjection" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.Extensions.Options" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.Extensions.PlatformAbstractions" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.Extensions.Primitives" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net45" developmentDependency="true" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Facebook" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Interop" version="1.0.0-rc3-20677" targetFramework="net451" />
<package id="Microsoft.Owin.Security.MicrosoftAccount" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Twitter" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="Respond" version="1.2.0" targetFramework="net45" />
<package id="System.Collections" version="4.0.11-rc2-24018" targetFramework="net451" />
<package id="System.Collections.Concurrent" version="4.0.12-rc2-24018" targetFramework="net451" />
<package id="System.ComponentModel" version="4.0.1-rc2-24018" targetFramework="net451" />
<package id="System.Diagnostics.Debug" version="4.0.11-rc2-24018" targetFramework="net451" />
<package id="System.Globalization" version="4.0.11-rc2-24018" targetFramework="net451" />
<package id="System.Linq" version="4.1.0-rc2-24018" targetFramework="net451" />
<package id="System.Linq.Expressions" version="4.0.11-rc2-24018" targetFramework="net451" />
<package id="System.Reflection" version="4.1.0-rc2-24018" targetFramework="net451" />
<package id="System.Resources.ResourceManager" version="4.0.1-rc2-24018" targetFramework="net451" />
<package id="System.Runtime" version="4.1.0-rc2-24018" targetFramework="net451" />
<package id="System.Runtime.Extensions" version="4.1.0-rc2-24018" targetFramework="net451" />
<package id="System.Runtime.InteropServices" version="4.1.0-rc2-24018" targetFramework="net451" />
<package id="System.Threading" version="4.0.11-rc2-24018" targetFramework="net451" />
<package id="System.Threading.Tasks" version="4.0.11-rc2-24018" targetFramework="net451" />
<package id="WebGrease" version="1.5.2" targetFramework="net45" />
</packages>

View File

@ -1,32 +0,0 @@
namespace Interop45.Migrations
{
using System;
using System.Data.Entity;
using System.Data.Entity.Migrations;
using System.Linq;
internal sealed class Configuration : DbMigrationsConfiguration<Interop45.Models.ApplicationDbContext>
{
public Configuration()
{
AutomaticMigrationsEnabled = false;
ContextKey = "Interop45.Models.ApplicationDbContext";
}
protected override void Seed(Interop45.Models.ApplicationDbContext context)
{
// This method will be called after migrating to the latest version.
// You can use the DbSet<T>.AddOrUpdate() helper extension method
// to avoid creating duplicate seed data. E.g.
//
// context.People.AddOrUpdate(
// p => p.FullName,
// new Person { FullName = "Andrew Peters" },
// new Person { FullName = "Brice Lambson" },
// new Person { FullName = "Rowan Miller" }
// );
//
}
}
}

View File

@ -1,6 +0,0 @@
update dbo.AspNetUsers set NormalizedUserName = UPPER(UserName);
Go
update dbo.AspNetUsers set NormalizedEmail = UPPER(Email);
Go
update dbo.AspNetRoles set NormalizedName = UPPER(Name);
Go

View File

@ -1,47 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Antlr" version="3.4.1.9004" targetFramework="net45" />
<package id="bootstrap" version="3.0.0" targetFramework="net45" />
<package id="EntityFramework" version="6.1.3" targetFramework="net45" />
<package id="jQuery" version="1.10.2" targetFramework="net45" />
<package id="jQuery.Validation" version="1.11.1" targetFramework="net45" />
<package id="Microsoft.AspNetCore.Cryptography.Internal" version="1.0.0-rc2-15760" targetFramework="net46" />
<package id="Microsoft.AspNetCore.DataProtection" version="1.0.0-rc2-15760" targetFramework="net46" />
<package id="Microsoft.AspNetCore.DataProtection.Abstractions" version="1.0.0-rc2-15760" targetFramework="net46" />
<package id="Microsoft.AspNetCore.DataProtection.Extensions" version="1.0.0-rc2-15760" targetFramework="net46" />
<package id="Microsoft.AspNetCore.Identity.Core" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNetCore.Identity.EntityFrameworkCore" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNetCore.Identity.Owin" version="2.2.1" targetFramework="net45" />
<package id="Microsoft.AspNetCore.Mvc" version="5.2.3" targetFramework="net45" />
<package id="Microsoft.AspNetCore.Razor" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.AspNetCore.Web.Optimization" version="1.1.3" targetFramework="net45" />
<package id="Microsoft.AspNetCore.WebPages" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.CodeDom.Providers.DotNetCompilerPlatform" version="1.0.0" targetFramework="net45" />
<package id="Microsoft.Extensions.Configuration" version="1.0.0-rc2-15779" targetFramework="net46" />
<package id="Microsoft.Extensions.Configuration.Abstractions" version="1.0.0-rc2-15779" targetFramework="net46" />
<package id="Microsoft.Extensions.Configuration.Binder" version="1.0.0-rc2-15779" targetFramework="net46" />
<package id="Microsoft.Extensions.DependencyInjection" version="1.0.0-rc2-15748" targetFramework="net46" />
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="1.0.0-rc2-15748" targetFramework="net46" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="1.0.0-rc2-15757" targetFramework="net46" />
<package id="Microsoft.Extensions.Options" version="1.0.0-rc2-15753" targetFramework="net46" />
<package id="Microsoft.Extensions.PlatformAbstractions" version="1.0.0-rc2-16062" targetFramework="net46" />
<package id="Microsoft.Extensions.Primitives" version="1.0.0-rc2-15802" targetFramework="net46" />
<package id="Microsoft.jQuery.Unobtrusive.Validation" version="3.2.3" targetFramework="net45" />
<package id="Microsoft.Net.Compilers" version="1.0.0" targetFramework="net45" developmentDependency="true" />
<package id="Microsoft.Owin" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Host.SystemWeb" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Cookies" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Cookies.Interop" version="1.0.0-t151023210157" targetFramework="net46" />
<package id="Microsoft.Owin.Security.Facebook" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Google" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.MicrosoftAccount" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.OAuth" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Owin.Security.Twitter" version="3.0.1" targetFramework="net45" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" targetFramework="net45" />
<package id="Modernizr" version="2.6.2" targetFramework="net45" />
<package id="Newtonsoft.Json" version="6.0.4" targetFramework="net45" />
<package id="Owin" version="1.0" targetFramework="net45" />
<package id="Respond" version="1.2.0" targetFramework="net45" />
<package id="WebGrease" version="1.5.2" targetFramework="net45" />
</packages>

View File

@ -0,0 +1,21 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Interop;
namespace Owin
{
public static class CookieInterop
{
public static ISecureDataFormat<AuthenticationTicket> CreateSharedDataFormat(DirectoryInfo keyDirectory, string authenticationType)
{
var dataProtector = DataProtectionProvider.Create(keyDirectory)
.CreateProtector("Microsoft.AspNet.Authentication.Cookies.CookieAuthenticationMiddleware", // full name of the ASP.NET 5 type
authenticationType, "v2");
return new AspNetTicketDataFormat(new DataProtectorShim(dataProtector));
}
}
}

View File

@ -1,12 +1,15 @@
// Copyright (c) Microsoft Corporation, Inc. All rights reserved. // Copyright (c) Microsoft Corporation, Inc. All rights reserved.
// Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information. // Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Data.Common; using System.Data.Common;
using System.Data.Entity; using System.Data.Entity;
using System.Data.Entity.Infrastructure; using System.Data.Entity.Infrastructure;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using System.Data.Entity.Validation;
using Microsoft.AspNet.Identity.EntityFramework;
namespace Microsoft.AspNetCore.Identity.Compat namespace Microsoft.AspNet.Identity.CoreCompat
{ {
public class IdentityDbContext<TUser> : public class IdentityDbContext<TUser> :
IdentityDbContext<TUser, IdentityRole, string, IdentityDbContext<TUser, IdentityRole, string,
@ -65,7 +68,7 @@ namespace Microsoft.AspNetCore.Identity.Compat
} }
public class IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim> : public class IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim> :
Microsoft.EntityFrameworkCore.IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim> where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
where TRole : IdentityRole<TKey, TUserRole> where TRole : IdentityRole<TKey, TUserRole>
where TUserLogin : IdentityUserLogin<TKey> where TUserLogin : IdentityUserLogin<TKey>
@ -117,11 +120,22 @@ namespace Microsoft.AspNetCore.Identity.Compat
.Map(config => config.ToTable("AspNetRoleClaims")); .Map(config => config.ToTable("AspNetRoleClaims"));
modelBuilder.Entity<TRole>().Property(x => x.ConcurrencyStamp).IsConcurrencyToken(true); modelBuilder.Entity<TRole>().Property(x => x.ConcurrencyStamp).IsConcurrencyToken(true);
}
protected override DbEntityValidationResult ValidateEntity(DbEntityEntry entityEntry, IDictionary<object, object> items)
{
if (entityEntry.Entity is TUser && entityEntry.State == EntityState.Modified)
{
entityEntry.Property("ConcurrencyToken").CurrentValue = Guid.NewGuid();
}
else if (entityEntry.Entity is TRole && entityEntry.State == EntityState.Modified)
{
entityEntry.Property("ConcurrencyToken").CurrentValue = Guid.NewGuid();
}
return base.ValidateEntity(entityEntry, items);
} }
public virtual IDbSet<TRoleClaim> RoleClaims { get; set; } public virtual IDbSet<TRoleClaim> RoleClaims { get; set; }
} }
} }

View File

@ -3,9 +3,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.AspNet.Identity.EntityFramework;
namespace Microsoft.AspNetCore.Identity.Compat namespace Microsoft.AspNet.Identity.CoreCompat
{ {
public class IdentityRole : IdentityRole<string, IdentityUserRole> public class IdentityRole : IdentityRole<string, IdentityUserRole>
{ {
@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Identity.Compat
} }
} }
public class IdentityRole<TKey, TUserRole> : Microsoft.EntityFrameworkCore.IdentityRole<TKey, TUserRole> public class IdentityRole<TKey, TUserRole> : Microsoft.AspNet.Identity.EntityFramework.IdentityRole<TKey, TUserRole>
where TUserRole : IdentityUserRole<TKey> where TUserRole : IdentityUserRole<TKey>
{ {
/// <summary> /// <summary>

View File

@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation, Inc. All rights reserved. // Copyright (c) Microsoft Corporation, Inc. All rights reserved.
// Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information. // Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNetCore.Identity.Compat namespace Microsoft.AspNet.Identity.CoreCompat
{ {
public class IdentityRoleClaim : IdentityRoleClaim<string> { } public class IdentityRoleClaim : IdentityRoleClaim<string> { }

View File

@ -2,9 +2,9 @@
// Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information. // Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information.
using System; using System;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.AspNet.Identity.EntityFramework;
namespace Microsoft.AspNetCore.Identity.Compat namespace Microsoft.AspNet.Identity.CoreCompat
{ {
public class IdentityUser : IdentityUser<string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim> public class IdentityUser : IdentityUser<string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim>
{ {
@ -29,17 +29,29 @@ namespace Microsoft.AspNetCore.Identity.Compat
} }
public class IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim> public class IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
: Microsoft.EntityFrameworkCore.IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim> : Microsoft.AspNet.Identity.EntityFramework.IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
where TUserLogin : IdentityUserLogin<TKey> where TUserLogin : IdentityUserLogin<TKey>
where TUserRole : IdentityUserRole<TKey> where TUserRole : IdentityUserRole<TKey>
where TUserClaim : IdentityUserClaim<TKey> where TUserClaim : IdentityUserClaim<TKey>
{ {
public string NormalizedUserName { get; set; } public string NormalizedUserName {
get
{
return UserName.ToUpperInvariant();
}
set { }
}
/// <summary> /// <summary>
/// Normalized email /// Normalized email
/// </summary> /// </summary>
public string NormalizedEmail { get; set; } public string NormalizedEmail {
get
{
return Email.ToUpperInvariant();
}
set { }
}
/// <summary> /// <summary>
/// Concurrency stamp /// Concurrency stamp

View File

@ -1,9 +1,7 @@
// Copyright (c) .NET Foundation. All rights reserved. // Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System; namespace Microsoft.AspNet.Identity.CoreCompat
namespace Microsoft.AspNetCore.Identity.Compat
{ {
public class IdentityUserLogin : IdentityUserLogin<string> { } public class IdentityUserLogin : IdentityUserLogin<string> { }
@ -11,7 +9,7 @@ namespace Microsoft.AspNetCore.Identity.Compat
/// Represents a login and its associated provider for a user. /// Represents a login and its associated provider for a user.
/// </summary> /// </summary>
/// <typeparam name="TKey">The type of the primary key of the user associated with this login.</typeparam> /// <typeparam name="TKey">The type of the primary key of the user associated with this login.</typeparam>
public class IdentityUserLogin<TKey> : Microsoft.EntityFrameworkCore.IdentityUserLogin<TKey> public class IdentityUserLogin<TKey> : EntityFramework.IdentityUserLogin<TKey>
{ {
/// <summary> /// <summary>
/// Gets or sets the friendly name used in a UI for this login. /// Gets or sets the friendly name used in a UI for this login.

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0.25123" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">14.0.25123</VisualStudioVersion>
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.Props" Condition="'$(VSToolsPath)' != ''" />
<PropertyGroup Label="Globals">
<ProjectGuid>6a74c6ea-b241-4d6b-bce4-bf89ec1d2475</ProjectGuid>
<RootNamespace>Microsoft.AspNet.Identity.CoreCompat</RootNamespace>
<BaseIntermediateOutputPath Condition="'$(BaseIntermediateOutputPath)'=='' ">..\..\artifacts\obj\$(MSBuildProjectName)</BaseIntermediateOutputPath>
<OutputPath Condition="'$(OutputPath)'=='' ">..\..\artifacts\</OutputPath>
</PropertyGroup>
<PropertyGroup>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<Import Project="$(VSToolsPath)\DotNet\Microsoft.DotNet.targets" Condition="'$(VSToolsPath)' != ''" />
</Project>

View File

@ -3,18 +3,18 @@
using System; using System;
using System.Data.Entity; using System.Data.Entity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.AspNet.Identity.EntityFramework;
namespace Microsoft.AspNetCore.Identity.Compat namespace Microsoft.AspNet.Identity.CoreCompat
{ {
public class IdentityUserStore<TUser> : public class UserStore<TUser> :
IdentityUserStore<TUser, IdentityRole, string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim>, IUserStore<TUser> UserStore<TUser, IdentityRole, string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim>, IUserStore<TUser>
where TUser : IdentityUser where TUser : IdentityUser
{ {
/// <summary> /// <summary>
/// Default constuctor which uses a new instance of a default EntityyDbContext /// Default constuctor which uses a new instance of a default EntityyDbContext
/// </summary> /// </summary>
public IdentityUserStore() public UserStore()
: this(new IdentityDbContext<TUser>()) : this(new IdentityDbContext<TUser>())
{ {
DisposeContext = true; DisposeContext = true;
@ -24,14 +24,14 @@ namespace Microsoft.AspNetCore.Identity.Compat
/// Constructor /// Constructor
/// </summary> /// </summary>
/// <param name="context"></param> /// <param name="context"></param>
public IdentityUserStore(DbContext context) public UserStore(DbContext context)
: base(context) : base(context)
{ {
} }
} }
public class IdentityUserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> public class UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
: UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim> : EntityFramework.UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
where TKey : IEquatable<TKey> where TKey : IEquatable<TKey>
where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim> where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
where TRole : IdentityRole<TKey, TUserRole> where TRole : IdentityRole<TKey, TUserRole>
@ -43,7 +43,7 @@ namespace Microsoft.AspNetCore.Identity.Compat
/// Constructor /// Constructor
/// </summary> /// </summary>
/// <param name="context"></param> /// <param name="context"></param>
public IdentityUserStore(DbContext context) : base(context) { } public UserStore(DbContext context) : base(context) { }
} }
} }

View File

@ -0,0 +1,35 @@
{
"version": "1.0.0-*",
"buildOptions": {
"warningsAsErrors": true,
"keyFile": "../../tools/Key.snk",
"nowarn": [ "CS1591" ],
"xmlDoc": true
},
"description": "A compatibility layer for sharing identity databases between Microsoft.AspNet.Identity.EntityFramework and Microsoft.AspNetCore.Identity.EntityFrameworkCore",
"packOptions": {
"repository": {
"type": "git",
"url": "git://github.com/aspnet/identity"
},
"tags": [
"aspnetcore",
"identity",
"membership"
]
},
"dependencies": {
"Microsoft.AspNet.Identity.EntityFramework": "2.2.1",
"Microsoft.AspNet.DataProtection.Extensions": "1.0.0-*",
"Microsoft.Owin.Security.Cookies": "3.0.1",
"Microsoft.Owin.Security.Interop": "1.0.0-*"
},
"frameworks": {
"net451": {
"frameworkAssemblies": {
"System.Collections": "",
"System.Data": ""
}
}
}
}