Skip to content

Instantly share code, notes, and snippets.

@mattkruskamp
Created August 25, 2015 04:41
Show Gist options
  • Save mattkruskamp/bfe725a286138994f5ba to your computer and use it in GitHub Desktop.
Save mattkruskamp/bfe725a286138994f5ba to your computer and use it in GitHub Desktop.
Asp.Net Membership and Roles Tutorials
<connectionStrings>
<add name=“TestConnection"
connectionString="your connection string here”/>
</connectionStrings>
<roleManager enabled=“true” defaultProvider=“MyTestRoleProvider”>
<providers>
<clear />
<add connectionStringName=“TestConnection"
applicationName=”/ApplicationName"
name=“MyTestRoleProvider” type=“System.Web.Security.SqlRoleProvider” />
</providers>
</roleManager>
<membership defaultProvider=“MyTestMembershipProvider"
userIsOnlineTimeWindow="20"
hashAlgorithmType="MD5”>
<providers>
<clear />
<add name=“MyTestMembershipProvider”
enablePasswordRetrieval=“false”
enablePasswordReset=“true”
requiresQuestionAndAnswer=“true”
applicationName=“/ApplicationName”
requiresUniqueEmail=“true”
passwordFormat=“Hashed”
maxInvalidPasswordAttempts=“5”
minRequiredPasswordLength=“6”
minRequiredNonalphanumericCharacters=“0”
passwordAttemptWindow=“10”
passwordStrengthRegularExpression=“"
connectionStringName="TestConnection”
type=“System.Web.Security.SqlMembershipProvider” />
</providers>
</membership>
<authentication mode=“Forms” />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment