Add ASP.NET Membership tables to the own existing database, or should I instead configure a separate ASP.NET membership database

asp.netasp.net-membershipdatabase-design

I was reading through this post here MisfitGeek: Adding ASP.NET Membership to your OWN Database.

and thought to my self what the common practice is. What do developers using ASP.NET membership and authorization in their applications recommend as a best practice? Creating the membership tables in the same database that stores their applications data or configuring a second database to store ONLY the membership information?

My current setup is a different database for membership information ONLY but am thinking that increases the number of databases I have to maintain. If I have 5 applications using ASP.NET membership, then that means 5 more ASP.NET membership databases.

So do you normally create the ASP.NET membership tables in your main database or you configure a separate membership table?

Best Answer

I personally just added the asp.net membership stuff to my own database. I then wrote a basic wrapper class around System.Web.Security.Membership class so that the code acts like its using its own membership stuff. Its pretty slick and not that hard to do. If you need assistance setting it up, here is what I did.

The link you provided on how to set it up is waaaaaaaaaayy more complicated that what I used:

  1. Run C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe.
  2. Hit Next.
  3. Select “Configure SQL Server for application services…” and hit Next.
  4. Select “Windows Authentication” and the “XXXX” Database and hit Next.
  5. Your settings are then presented...then hit Next.
  6. Finally you should be presented with a done screen, hit Finish.

I have screenshots in the doc if you really need the walkthrough.