Before Microsoft released MVC 4, I created my project with the good old ASP.NET Membership Provider. After release of MVC 4, Microsoft switched to SimpleMembership by WebMatrix. My project was pretty huge, so I searched for an upgrade path to switch without harming the project. I was in no luck finding a method to switch over, so I followed my own “upgrade path” and decided to share it with the world.

Here is the upgrade path I used:

  1. Backup everything (Code and SQL)
  2. Create a new Internet Application [with SimpleMembership]
  3. Move following folders from old project to new project:
    • Scripts
    • Content
    • Images
    • Controllers [don’t overwrite AccountController.cs]
    • Models [don’t overwrite AccountModels.cs]
    • Views
  4. Insert connectionString from old project into Web.config
  5. Run project and create a new user. Then the SimpleMembership SQL tables will be created automatically.
  6. Use Entity Framework Power Tools, right click on project and choose Entity Framework -> Reverse Engineer Code First, to generate all EF entity/mapping classes for all SQL tables.
  7. Delete UserProfile entity and UserProfileMap classes, because they come with SimpleMembership’s AccountModels.
  8. Refactor GUID to integer in the whole project.