What is the easiest way to migrate existing login to membership?

Posted on 2011-10-03
Last Modified: 2012-05-12
I have an existing site with simple authentication (through a database) and I want to change it to membership.

My exisiting login calls a stored procedure that returns the user id and other relevant details if user and password matches. I then store those to the session and each of my "secured" pages checks for the session variables to determine if they are an authenticated user.

Please note that the passwords currently are NOT encrypted.

There could be lots of solutions here so it would be better if there's a brief explanation of why I should do it your way.
Question by:karlomedallo23
    1 Comment
    LVL 16

    Accepted Solution

    The best way to keep your underlining database and your exisiting code is to create a Custom Membership provider. You can call of your exisitng code from your provider to update/add/remove users then you can get all the functionalty from the Memebership API and cool login controls while keeping your database intact.

    A quick vid on how to implement it:

    Some articles:

    Implementing a Membership Provider

    Writing a Custom Membership Provider for the Login Control in ASP.NET 2.0

    Writing A Custom Membership Provider for your ASP.NET 2.0 Web Site


    Featured Post

    Threat Intelligence Starter Resources

    Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

    Join & Write a Comment

    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now