Within your IDE, create the following Web forms and name them Registration.aspx, Login.aspx, and PasswordRecovery.aspx. Without writing any code, all you have to do is drag and drop the CreateUserWizard, Login, and PasswordRecovery controls from your toolbox onto the respective web form.
Figure 7: CreateUserWizard Control
Figure 8: Login Control
Figure 9: PasswordRecovery Control
At this point, it would worth mentioning the configuration behind this control is located in the machine.config file located within your .NET 2.0 framework installation directory (C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG). If you open machine.config and look for the entry AspNetSqlMembershipProvider within the Membership node you will find the settings associated to creating new user accounts.
Listing 2: Default AspNetSqlMembershipProvider Settings
<add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider,
System.Web, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqlServer"
enablePasswordRetrieval="false"
enablePasswordReset="true"
requiresQuestionAndAnswer="true"
applicationName="/"
requiresUniqueEmail="false"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="5"
minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1"
passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />
Now that I have touched on customizing the AspNetSqlMembershipProvider, let us now return to the Web forms we previously created and register a new user. As you will see, we have provided the capability for users to create an account, recover a forgotten password, and, finally, the login functionality all within a matter of minutes.