Overview of Membership and installing Sql Server Membership Provider - Part I
Bookmark
 

Rating: 5.00/5
1 2 3 4 5
1 people have rated this article

 
Posted On: Mar 07 2009
Views: 656
BookMarked: 0
Downloads: 0
 
 

Microsoft introduced lots of new services in Asp.NET 2.0. One of the unique services is Membership.  Membership provides the common need for the websites to create and manage users. It is built using the Microsoft Provider model which is easy to plug in to an existing websites. It is also easy to customize according to our need.


The membership takes the settings and values from the web.config file. At the runtime, Membership class talks to web.config file for the connection string and other settings. So it is easy to change the settings in the web.config without recompiling the website.


Since this article is about theASP.NET membership, I am not going to dissemble Membership class and explain each and every method.


To get the user information we use Membership User class.  This class reflects particular users UserName, Password, CreationDate, LastLoginDate etc.

SqlMembserhipProvider

Membsership by default comes in two features

  1. Memebership using Sql sever.
  2. Membership using Active Directory.


In this article we will examine about installing and configuring Membership using SqlServer.

Sql Membership Provider uses Microsoft common schema for data store. Most of the table is related with one another by the user. To start building your role and user based website, first we need to install the database schema on a Sql Server.

You need to install directly to the database. Microsoft provides aspnet_regsql.ex tool to install the Membership, Role Manager, Profile and Web Parts Personalization database schema.

  1. Browse to C:\WINDOWS\Microsoft.NET\Framework\v2.0.XXX.
  2. Find and Open aspnet_regsql.exe.



  3. Select an existing database or Create a new database from Sql server Management Studio.






  4. Hit next to finish the installation.

 
Now open up your SQL Server Management Studio. Expand the database which was selected for the memebership installation.

 

Now you can see lots of the table and procedure installed on the selected database. This database will be used for configuring membership, roles, webpart personalization.

Please continue to next part to create user using SqlMembershipProvider and customizing login control for your website.


Create User Using SqlMembershipProvider And Customizing Login Control - Part II



Rate This Article

Please Sign In In to post messages.