ASP.NET Core aims for a complete framework with EF6 and Identity

I currently have a .NET Core web application focused on the full .NET Framework and a .NET 4.6.1 class library project containing my EF6 implementation.

I have these two working together now.

Now I need to add Identity, but I need to configure the implementation. (If that matters, I'm building against an existing user table and only care about local logins)

So, in the class library project 4.6.1, I created personalized Identity classes / stores / managers with this guide: https://www.asp.net/identity/overview/extensibility/change-primary-key-for-users-in -aspnet-identity

The part I'm stuck with is setting up the .NET Core application to use the non-server version of Identity.

All textbooks have configs similar to

services.AddIdentity<ApplicationUser, ApplicationRole>(config => { }) .AddEntityFrameworkStores<ApplicationDbContext>(); 

and

 app.UseIdentity(); 

However, both of these methods exist only in Microsoft.AspNetCore.Identity, and not in Microsoft.AspNet.Identity.Core, which uses the class library.

What frameworks should the .NET Core application have? And what should the Startup.cs configuration look like?

To keep things simple, all of my individual identification codes are exactly what is in the article above.

The Startup.cs code looks like this (with an AspNetCore.Identity link)

 services.AddIdentity<ApplicationUser, CustomRole>(config => { /* config */ }) .AddUserManager<ApplicationUserManager>() .AddUserStore<CustomRoleStore>() .AddDefaultTokenProviders(); 

Sample Controller

 public AccountController(ApplicationSignInManager signInManager) { _signInManager = signInManager; } 

Error trying to start it

InvalidOperationException: The ApplicationUserManager type should be inferred from the UserManager.

+7
c # asp.net-core-mvc asp.net-identity
source share

No one has answered this question yet.

See related questions:

5
ASP.NET Kernel ID - Hasher Password Extension
2
Initialize Identity ApplicationUserManager in the class library
one
ASP.NET Core MVC User Authentication Properties
0
Porting from asp.net to asp.net core
0
ASPNET Core + Entity Framework 6 + ASPNET Identity 2 on Azure Service Fabric
0
Identity in the ASP.NET MVC Framework Using Identity Core
0
How can I extend my role object in ASP.NET Core Identity?
0
Add password expiration in ASP.NET Core 2.1 MVC Identity
0
How to configure an identifier in Asp.Net Core 2.0 Target Framework 4.6.1 using Asp.Net.Identity and Entity Framework 6?

All Articles