Reputation: 1423
I have a web application developed in classic asp ( the version before asp.net). I am redeveloping it in asp.net core 2.0. I want to use same database with users table as it has all the data. i want to keep classic asp site as well and use same database for classic as well as new asp.net web application. in asp.net core application i want to use identity. I want to add new columns which are requrited by identity to users table and use users table instead of aspnetusers table for asp.net core. How can i do this without breaking classic asp site?
Upvotes: 1
Views: 333
Reputation: 11483
If you want to use same data from ASP Classic
then you may encounter problems. In your ASP Classic database you use table 'User' to store authentication information. Probably you have a field for password. How it is stored? In clear or a specific hashing?
ASP.NET Identity has its own mechanism for storing passwords. It use specific kinfs of hashing that is likely different than you legacy application. Consequently you can not use same password in two applications.
Same maybe through for Roles.
Upvotes: 1
Reputation: 792
The migration can be done in two steps:
Asp.Net Core uses Entity Framework Core which can be used as database first, meaning it can work with existing database. All you will need to do is to connect your existing database to you new project and use scaffold so the entity framework will obtain the database and create models according to it.
Check this link to find out exact steps.
Their might be some further changes needed in identity related tables so it will work with your existing database.
This link provides information about the way to do so.
Upvotes: 0