Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 902
StackTrace Avatar asked Oct 05 '10 07:10

StackTrace


People also ask

What is membership configuration?

As part of membership configuration, you specify: Which membership provider (or providers) to use. (This typically also specifies what database to store membership information in.) Password options such as encryption and whether to support password recovery based on a user-specific question. Users and passwords.

What does ASP.NET use to handle all its database connections?

The datareader object in ASP.Net is used to hold all the data returned by the database. The While loop in ASP.net can be used to read the data rows one at a time. The data adapter object is used to perform SQL operations such as insert, delete, and update.

What is SQL Membership Provider?

SQLMembershipProvider : It is used to store user information in a SQL Server database. ActiveDirectoryMembershipProvider : It is used to store user information in an Active Directory.


1 Answers

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.

like image 50
John Avatar answered Oct 05 '22 08:10

John