To configure it for User Login, I first added the user database to the SQL server using this method.
Next, I changed the web.config file to include:
Just change the myX fields to your fields. And now your configuration manager should work to add users and roles.
<connectionStrings>
<add name="ConnectionString" connectionString="Data Source=my.host.net;Database=myDatabase;uid=myUserId;pwd=myPassword" providerName="System.Data.SqlClient"/>
</connectionStrings>
<system.web>
<authentication mode="Forms" />
<membership defaultProvider="AspNetSqlMembershipProvider">
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider, System.Web, Version=1.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" connectionStringName="LocalSqlServersm" requiresQuestionAndAnswer="true" requiresUniqueEmail="true" passwordFormat="Hashed" minRequiredNonalphanumericCharacters="0" minRequiredPasswordLength="3" applicationName="/" enablePasswordRetrieval="false" enablePasswordReset="true" maxInvalidPasswordAttempts="3"/>
</providers>
</membership>
<roleManager enabled="true" />
No comments:
Post a Comment