How to configure ASP.Net Identity

After reading a lot about the ASP.Net ID, I'm still confused about some of the things that have recently been added to the ASP.Net authentication system.

  • How to use ASP.Net identifier if I have already created a database with its user management tables? for example, I want to map an AspNetUsers table to my own table called UserAccounts .
  • How should this new system be mixed with an existing ASP.Net MVC application?
  • What if I do not want to use the code first (Identity uses the code first)?

Any advice would help. Thanks at Advance.

+6
source share
4 answers

Not quite the answer to your question. But you can check this project:

ASP.NET Identity Database (Project Template) in Visual Studio Gallery

It can be used as the basis for creating your own ASP.NET identity provider using a database-based approach. Currently, it only has a Db schema design template. But soon there will also be a proprietary DbFirst identity provider project template, as well as unit tests for it.

+2
source

You should use Entity Framework Migrations, here are some useful links that may help you:

http://blogs.msdn.com/b/webdev/archive/2013/10/16/customizing-profile-information-in-asp-net-identity-in-vs-2013-templates.aspx

http://www.asp.net/identity/overview/migrations/migrating-an-existing-website-from-sql-membership-to-aspnet-identity

From this link you can go from MVC4 to MVC5

http://www.asp.net/mvc/tutorials/mvc-5/how-to-upgrade-an-aspnet-mvc-4-and-web-api-project-to-aspnet-mvc-5-and- web-api-2

and in the latter case, if you do not want to use EF, I don’t think you can use an identifier, these nuget packages are needed to identify asp.net:

Nuget Packages

 Microsoft.Aspnet.Identity.Core This package contains the core interfaces of ASP.NET Identity. core Microsoft.Aspnet.Identity.EntityFramework This package contains the implementation of ASP.NET Identity system which works with Entity Framework. This means that if you use this package then you can store information in a Sql Server database. 

http://blogs.msdn.com/b/webdev/archive/2013/06/27/introducing-asp-net-identity-membership-system-for-asp-net-applications.aspx

0
source

There are various functions associated with applying an ASP.NET identifier in an application. You should check out the following article in which I described the goals:

http://www.c-sharpcorner.com/UploadFile/4b0136/getting-started-with-Asp-Net-identity-in-visual-studio-2013/

-1
source

Source: https://habr.com/ru/post/958143/


All Articles