First create a data base using SQL Server. (You can use Visual Studio to create your database)
This command will launch wizard which can use to generate relevant database structure to selected database.
Now we have to configure the web.config
<connectionStrings>
<add name="ConnectionString"
connectionString="Data Source=TestDB;Initial Catalog=Login;User ID=sa;Password=sapassword"/>
</connectionStrings>
<system.web>
<roleManager enabled="true" defaultProvider="SqlRoleProvider">
<providers>
<clear/>
<add name="SqlRoleProvider"
connectionStringName="ConnectionString"
type="System.Web.Security.SqlRoleProvider"/>
</providers>
</roleManager>
<membership defaultProvider="SqlProvider"
userIsOnlineTimeWindow="15">
<providers>
<clear />
<add
name="SqlProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="ConnectionString"
applicationName="MyApplication"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
requiresUniqueEmail="true"
passwordFormat="Hashed" />
</providers>
</membership>
</system.web>
There can be other tags in between System.web tag.
Comments