0

I have an asp.net application and a login table with fields username,password,role,emailid etc. which is being used for Login purposes in the application. When I created the application I had no idea of membership in ASP.NET.(being a beginner)

Can I map this table to the ASP.NET Membership code without changing the original login table, Because the same table is updated in forgot password functionality also.

My application will also become secured when Membership code is implemented.

BAPSDude
  • 331
  • 1
  • 4
  • 16

2 Answers2

1

If you are storing your passwords in the database in cleartext then you should be able to write a little bit of code to programmatically loop through your existing users and recreate your them under ASP.NET's membership provider. Look into the Membership.CreateUser method and its various overloads. Keep in mind that there are multiple providers to choose from these days, so be sure you choose the one that's right for your application.

If you have any foreign key references pointing to your existing Users database table you'll just need to do a little bit of rewiring as well, but if my original assumption that you have the passwords available unhashed is correct this shouldn't be too difficult.

You may want to also look here and here for more help.

joelmdev
  • 11,083
  • 10
  • 65
  • 89