简体   繁体   中英

How to add authentication to a .Net Core 2 application using old authentication data?

I created an MVC Core 2.1 application. Now I need to add authentication (and authorization) to it, but I need to use user membership data used by our old applications (tables aspnet_Users, aspnet_Membership etc). I have already asked similar question before ( How can I use existing ASP.NET Membership data in a new .Net Core project? ), but did not receive an answer.

MS posted a howto just recently. It doesn't do what you want directly, instead it migrates data to the new tables. I don't think you can use the old tables without some custom code as the data types and names have changed and the hash algorithms for the password field is different too.

https://docs.microsoft.com/en-us/aspnet/core/migration/proper-to-2x/membership-to-core-identity?view=aspnetcore-3.0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM