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?
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.
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.
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.
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:
- Run C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regsql.exe.
- Hit Next.
- Select “Configure SQL Server for application services…” and hit Next.
- Select “Windows Authentication” and the “XXXX” Database and hit Next.
- Your settings are then presented...then hit Next.
- Finally you should be presented with a done screen, hit Finish.
I have screenshots in the doc if you really need the walkthrough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With