0

メンバーシッププロバイダーの「名前の追加」セクションに属性を追加しようとしましたが、Intellisenxeはそれらをサポートしていないようです>追加したい属性のいくつかは次のとおりです。

  1. minReqiredNonalphanumericCharacters
  2. maxInvalidPasswordAttempts
  3. requireUniqueEmail

以下はweb.configです。前もって感謝します。

<?xml version="1.0"?>

<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->

<configuration>
    <system.web>
        <compilation debug="true" targetFramework="4.0" />

      <roleManager enabled="true"
                 defaultProvider="CustomizedRoleProvider">
        <providers>
          <add name="CustomizedRoleProvider"
               type="System.Web.Security.SqlRoleProvider"
               connectionStringName="RestaurantDB" />
        </providers>
      </roleManager>

      <membership defaultProvider="CustomizedMembershipProvider">
        <providers>
          <add name="CustomizedMembershipProvider" 
               minRequiredPasswordLength="6" 
               type="System.Web.Security.SqlMembershipProvider"
               connectionStringName="RestaurantDB" />
        </providers>
      </membership>      
    </system.web>

  <appSettings>

  </appSettings>

  <connectionStrings>
    <add name="RestaurantDB" connectionString="data source=SFP\SFP_SQL_SVR;attachdbfilename=C:\Users\Susan\Documents\Databases\Restaurants.mdf;Integrated Security=SSPI;"/>
    <add name="RestaurantsEntities" connectionString="metadata=res://*/Restaurant.csdl|res://*/Restaurant.ssdl|res://*/Restaurant.msl;provider=System.Data.SqlClient;provider connection string=&quot;data source=SFP\SFP_SQL_SVR;attachdbfilename=C:\Users\Susan\Documents\Databases\Restaurants.mdf;integrated security=True;multipleactiveresultsets=True;App=EntityFramework&quot;" providerName="System.Data.EntityClient" />
  </connectionStrings>



</configuration>
4

1 に答える 1

4

これを試して:

<configuration>
        ...
        <system.web>
            ...
            
                <membership 
                 defaultProvider="SqlProvider" userIsOnlineTimeWindow="20">
                 <providers>
                    <clear/>
                    <add name="SqlProvider"
                        type="System.Web.Security.SqlMembershipProvider"
                        connectionStringName="LocalSqlServer"
                        enablePasswordReset="true"
                        requiresQuestionAndAnswer="false"
                        requiresUniqueEmail="false"
                        maxInvalidPasswordAttempts="5"
                        passwordAttemptWindow="10"
                        passwordFormat="Hashed"
                        minRequiredPasswordLength="7"
                        minRequiredNonAlphanumericCharacters="0"
                        passwordStrengthReqularExpression="0"
                        enablePasswordRetrieval="false"
                        applicationName="/" />
                </providers>
            </membership>
            ...
        </system.web>
        ...
    </configuration>
于 2012-05-02T15:27:34.703 に答える