In order to set up your application to use Microsoft’s ASP.net Membership Provider you need to do the following.
1. Set up your database by installing the Membership schema. This is done by locating the aspnet_regsql.exe utility found in the C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 directory. Run it using the -W flag (aspnet_regsql -W) and walk through the wizard that you are presented with.
2. Add a connection string to your web.config which points to the database you just installed the Memberhsip schema in.
<add name="LocalSqlServer"
connectionString="server=THESQLSERVER;uid=DATABASEUSERID;pwd=DATABASEPASSWORD;database=DATABASENAME"
providerName="System.Data.SqlClient" />
3. Then you need to add the membership provider to the web.config as follows
<add connectionStringName="LocalSqlServer" name="AspNetSqlMembershipProvider"
enablePasswordRetrieval="false" enablePasswordReset="true"
applicationName="/" requiresUniqueEmail="false" passwordFormat="Hashed"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6"
minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
passwordStrengthRegularExpression="" requiresQuestionAndAnswer="true"
type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
4. Thats it, your done!
Nice and concise 😉 I've slogged through some of the tutorials on Asp.net and you have captured the essential. A good time saver!
LikeLike