To install the membership database
Open the Visual Studio 2005 command prompt, and run the following command: aspnet_regsql.exe -E -S localhost -A m
Where:
- -E indicates authenticate using the Windows credentials of the currently logged on user.
- -S (server) indicates the name of the server where the database will be installed or is already installed.
- -A m indicates add membership support. This creates the tables and stored procedures required by the membership provider.
aspnet_regsql.exe on it's own bring up a wizard which can be used to create the procedure
Web.config Settings
Athentication Mode needs to be changed from "Windows" to "Forms"
Example:
<authentication mode="Forms">
protection="All"
requireSSL="false"
timeout="10"
slidingExpiration="true"/>
</authentication>
<membership defaultProvider="SQLMembershipProvider">
<clear/>
<add
name="SQLMembershipProvider"
type="System.Web.Security.SqlMembershipProvider"
connectionStringName="RUMC_ConnectionString"
enablePasswordRetrieval="False"
enablePasswordReset="True"
requiresQuestionAndAnswer="True"
requiresUniqueEmail="True"
passwordFormat="Hashed"
maxInvalidPasswordAttempts="3"
/>
</providers>
</membership>
<roleManager
enabled="true" defaultProvider="SQLRoleProvider">
<providers>
<clear/>
<add
name="SQLRoleProvider" type="System.Web.Security.SqlRoleProvider"
connectionStringName="RUMC_ConnectionString"
/>
</roleManager>
No comments:
Post a Comment