2011-02-03 14 views
0

私はASP.NET 2010アプリケーションを持っています。私はregistraitonプロセスを通過するとき、私は正確に記録されます。しかし、私はちょうど後でログインしようとした場合、のvalidateUserは常に」私はある正しいユーザ名&パスワードを確保するために通過強化しましたなぜMembership.ValidateUser()は常にfalseを返しますか?

blnSuccess = Membership.ValidateUser(strUserName, strPassword) 

falseを返します。この人がdb(Express)に入っていることを示しています。ここに私のWeb.Configがあります....すべて普通のものです。

<connectionStrings> 
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/> 
</connectionStrings> 

<authentication mode="Forms"> 
<forms 
     name=".ASPXAUTH" 
     loginUrl="~/Account/Login.aspx" 
     protection="All" 
     timeout="2880" 
     slidingExpiration="true" 
/> 
</authentication> 
    <membership> 
    <providers> 
    <clear/> 
    <add name="AspNetSqlMembershipProvider" 
      type="System.Web.Security.SqlMembershipProvider" 
      connectionStringName="ApplicationServices" 
      enablePasswordRetrieval="false" 
      enablePasswordReset="true" 
      requiresQuestionAndAnswer="false" 
      requiresUniqueEmail="false" 
      maxInvalidPasswordAttempts="5" 
      minRequiredPasswordLength="6" 
      minRequiredNonalphanumericCharacters="0" 
      passwordAttemptWindow="10" 
      applicationName="/"/> 
    </providers> 
    </membership> 
+0

承認されているか、間違った資格を持っている場合これらが原因です –

答えて

関連する問題