. NET 2.0 provides membership management, and this article briefly describes the basic steps for using membership management.
1. Create a database using Aspnet_regsql
Open Visual Studio Command Prompt, enter aspnet_regsql, create ASPNETDB Database from the wizard, and save user information.
Change configuration in 2.web.config file
<connectionStrings>
<add name= "sqlservices" connectionstring= "Data source= (local); Integrated security=sspi;initial;" />
</connectionStrings>
<system.web>
<membership defaultprovider= "SQLProvider" userisonlinetimewindow= ">"
<providers>
<add name= "SQLProvider" type= "System.Web.Security.SqlMembershipProvider" connectionstringname= "Sqlservices" Enablepasswordretrieval= "false" enablepasswordreset= "true" requiresquestionandanswer= "true" Passwordformat = " Hashed "applicationname="/"/>
</providers>
</membership>
</system.web>
3. Select Web site/asp.net configuration, you can make some manual configuration of membership.
4. Create Newuser.aspx page, add CreateUserWizard control to this page
<asp:createuserwizard id= "CreateUserWizard1" runat= "Server" >
<WizardSteps>
<asp:createuserwizardstep runat= "Server" >
</asp:CreateUserWizardStep>
<asp:completewizardstep runat= "Server" >
</asp:CompleteWizardStep>
</WizardSteps>
</asp:CreateUserWizard>
5. Create the Login.aspx page, add the login control to the page, set the Createusertext and Createuserurl properties
<asp:login id= "Login1" runat= "Server" createusertext= "Create New User" createuserurl= "~/newuser.aspx"
Destinationpageurl= "~/default.aspx" >
</asp:Login>
6. Add LoginStatus and LoginName controls to the Default.aspx page
<asp:loginstatus id= "LoginStatus1" runat= "Server"/>
<asp:loginname id= "LoginName1" runat= "Server"/>
7. Set the Login.aspx as the starting page for testing.