Asp. NET membership and role management configuration content

Source: Internet
Author: User
Tags connectionstrings

The Web. config is configured to make it easy to connect to the database using Microsoft-provided membership classes, such as
<?XML version= "1.0" encoding= "Utf-8"?><!--For more information about how to configure an ASP. NET application, go to http://go.microsoft.com/fwlink/?LinkId=169433 -<Configuration>  <connectionStrings>    <!--Data Connection -    <Addname= "Conn"connectionString= "server=."; Database=vsdb;uid=sa;pwd=admin "ProviderName= "System.Data.SqlClient"/>    <!--Complex connection Mode connectionstring= "Data source=.; attachdbfilename=| Datadirectory|\aspnet.mdf;initial catalog=aspnet;integrated security=true; User instance=true; Multipleactiveresultsets=true " -  </connectionStrings>  <system. Web>    <compilationDebug= "false"targetframework= "4.0" />    < Profiledefaultprovider= "Defaultprofileprovider" >      <providers>        <Addname= "Defaultprofileprovider"type= "System.Web.Providers.DefaultProfileProvider"connectionStringName= "DefaultConnection"ApplicationName="/"/>      </providers>    </ Profile>    <!--member Management -    <Membershipdefaultprovider= "AspNetSqlMembershipProvider">      <providers>        <Clear/>        <Addname= "AspNetSqlMembershipProvider"type= "System.Web.Security.SqlMembershipProvider, system.web, version=2.0.3600.0, Culture=neutral, publickeytoken= B03F5F7F11D50A3A "connectionStringName= "Conn"enablePasswordRetrieval= "false"enablePasswordReset= "true"requiresQuestionAndAnswer= "false"requiresUniqueEmail= "false"maxinvalidpasswordattempts= "3"minRequiredPasswordLength= "6"minRequiredNonalphanumericCharacters= "0"passwordAttemptWindow= "Ten"ApplicationName="/" />        <!--connectionStringName: The name of the connection string -        <!--enablePasswordReset: Gets a value that indicates whether the password can be reset.  -        <!--enablepasswordretrieval: Gets a value that indicates whether the user is allowed to extract the password.  -        <!--Hashalgorithmtype: Gets a value for the algorithm identifier of the password -        <!--maxinvalidpasswordattempts: Gets a value that locks the number of retries allowed between users.  -        <!--minrequirednonalphanumericcharacters: Gets a value that has the fewest number of special characters in the password. Password Strength -        <!--minrequiredpasswordlength: Get the Minimum password length -        <!--requiresquestionandanswer: Gets a value that indicates whether the user is asked to answer the password question to re-extract the password.  -        <!--Userisonlinetimewindow: Specifies the number of minutes after the user's last activity date, in which the user is considered online.  -        <!--requiresUniqueEmail: Whether the mailbox name is unique -        <!--...... -      </providers>    </Membership>    <!--Role Management -    <rolemanagerenabled= "true"cacheRolesInCookie= "true">      <providers>        <Clear/>        <AddconnectionStringName= "Conn"ApplicationName="/"name= "AspNetSqlRoleProvider"type= "System.Web.Security.SqlRoleProvider, system.web, version=2.0.0.0, Culture=neutral, publickeytoken= B03F5F7F11D50A3A "/>      </providers>    </rolemanager>    <sessionstateMode= "Custom"CustomProvider= "Defaultsessionprovider">      <providers>        <Addname= "Defaultsessionprovider"type= "System.Web.Providers.DefaultSessionStateProvider"connectionStringName= "DefaultConnection"ApplicationName="/"/>      </providers>    </sessionstate>  </system.web></Configuration>

ASP. NET membership and role management configuration content

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.