2011-07-31 100 views
0

每當我試圖登錄或註冊我的網頁上我得到這個錯誤:asp.net着登錄或註冊

Cannot open user default database. Login failed. 
Login failed for user 'sa'. 

這裏是我的連接字符串:

<remove name="loginserver"/> 
    <add name="loginserver" connectionString="Data Source=AHMED-PC\SQLEXPRESS;AttachDBFilename=|DataDirectory|aspnetdb.mdf;Persist Security Info=false;User ID=sa;Password=123456" providerName="System.Data.SqlClient"/> 

      <providers> 
      <remove name="AspNetSqlMembershipProvider"/> 
      <add name="AspNetSqlMembershipProvider" 
       type="System.Web.Security.SqlMembershipProvider, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 
       connectionStringName="loginserver" 
       enablePasswordRetrieval="true" 
       enablePasswordReset="true" 
       requiresQuestionAndAnswer="false" 
       applicationName="/" 
       requiresUniqueEmail="true" 
       minRequiredPasswordLength="6" 
       minRequiredNonalphanumericCharacters="0" 
       passwordFormat="Encrypted" 
       maxInvalidPasswordAttempts="5" 
       passwordAttemptWindow="10" 
       passwordStrengthRegularExpression=""/> 
     </providers>  

我通常能登錄或註冊通常,但突然我開始得到這個錯誤。

所以有什麼問題,謝謝

回答

0

只是刪除了SQL Express中的aspnet.mdf和現在的作品