改变ASP.NET 2.0中的Membership的密码要求

需要在配置文件里修改MembershipProvider的设置,

<connectionStrings>
  <add name="MySqlConnection" connectionString="Data Source=MySqlServer;Initial Catalog=aspnetdb;Integrated Security=SSPI;" />
</connectionStrings>
<system.web>
.....
<membership defaultProvider="SqlProvider" userIsOnlineTimeWindow="15">
    <providers>
      <clear />
      <add
        name="SqlProvider"
        type="System.Web.Security.SqlMembershipProvider"
        connectionStringName="MySqlConnection"
        applicationName="MyApplication"
        minRequiredNonalphanumericCharacters="0"
        minRequiredPasswordLength="6"
        passwordStrengthRegularExpression="......" />
    </providers>
</membership>

参考MSDN文章

How To: Use Membership in ASP.NET 2.0

How To: Use Forms Authentication with SQL Server in ASP.NET 2.0

以及Mark Michaelis这个blog:

Passwords in VS 2005 Beta 2's Personal Website Starter Kit

你可能感兴趣的:(asp.net)