Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using ASP.NET Membership Provider with an existing user database

I'm currently re-writting an entire website in .Net. The current website is written in foxpro and uses custom logic, validation rules, and Sql server tables to store and authenticate users.

I want to use Membership Provider but I have one major problem that I'm not sure how to overcome.

Both, the new site and the old site have to share users and credentials. The users will have to be able to use both sites during the transition phase without having to update their profiles separately.

  1. What is the best way to implement Membership Provider without breaking the existing system?

  2. Do I have to use all the tables, views, procedures, etc that come with Membership provider?

  3. Is my logic flawed? Is Membership Provider worth it?

Any tutorial or video links are much appreciated.

like image 563
SLoret Avatar asked Aug 25 '11 21:08

SLoret


1 Answers

Over the last couple of days, I've been doing more research and reading and it looks like the way to go is writting my own Custom Membership Provider. Below are some links I found most helpful.

I will say this, while writting the custom membership provider is going to take a little time, the benefits will far outweight the time it will take because it saves so much other coding. Plus it leaves open the option for converting to the built-in .Net membership provider latter on. If I do want to switch later, all I have to do is change the web.config settings, install the support tables in my DB and covert current users into the new set of tables. I shouldn't have to touch any of my code to complete the conversion which is cool!!!

Links:

Intro to Membership

Creating Custom Membership Provider

Custom Membership Providers

Step-By-Step Custom Membership Provider Creation Tutorial

like image 72
SLoret Avatar answered Oct 06 '22 22:10

SLoret