asp.net登录控件不起作用

问题描述

| 我放了一个登录控件,它不会让我进入网站。 (我什至尝试使用登录控制来检索和重置密码。仍然无法正常工作)。 这是我的web.config文件的一部分。昨天,我通过更改add标签中的属性来解决该问题。但是今天问题又重演了。 http://go.microsoft.com/fwlink/?LinkId=169433   ->                                       
     <add name=\"YourGuruDB\" connectionString=\"Data Source=DIMA-00AA1DA557;Initial Catalog=model;Integrated Security=True\"/>
        <add name=\"modelConnectionString\" connectionString=\"Data Source=DIMA-00AA1DA557;Initial Catalog=model;Integrated Security=True\" providerName=\"System.Data.SqlClient\"/>
        <add name=\"LocalSqlServer2\" connectionString=\"Data Source=.\\SQLEXPRESS;AttachDbFilename=\'D:\\Documents and Settings\\Dima\\My Documents\\Visual Studio 2010\\WebSites\\WebSite10\\App_Data\\ASPNETDB.MDF\';Integrated Security=True;User Instance=True\" providerName=\"System.Data.SqlClient\"/>


  </connectionStrings>
  <system.web>



    <membership defaultProvider=\"MyMembershipProvider\">
      <providers>
        <clear/>
        <add
          name=\"MyMembershipProvider\"
          type=\"System.Web.Security.SqlMembershipProvider\"
          connectionStringName=\"LocalSqlServer2\"
          minRequiredPasswordLength=\"2\"
          minRequiredNonalphanumericCharacters=\"0\"
          maxInvalidPasswordAttempts=\"1000\"
          passwordAttemptWindow=\"1000\"
          />
      </providers>
    </membership>

    <roleManager enabled=\"true\" />

    <authentication mode=\"Forms\">
        <forms name=\"MyAppCookie\"
             loginUrl=\"~/Registration.aspx\"
             protection=\"All\"
             timeout=\"30\" path=\"/\" />
    </authentication>
    

解决方法

\“ LocalSqlServer \”是否作为连接字符串存在? 您遇到什么错误? 您应该在ConnectionString部分中找到类似以下内容的内容:
 <add name=\"LocalSqlServer\" connectionString=\"<YourConnectionString>\" providerName=\"System.Data.SqlClient\"/>
您是否启用了FormsAuthentication?
  <authentication mode=\"Forms\">
     <forms loginUrl=\"<YourLoginPage>\" timeout=\"2880\"/>
   </authentication>
    ,您是要重置密码还是要通过电子邮件发送您的实际密码? 您是否检查过成员资格表以确保您未被锁定? 我可以看到您有
maxInvalidPasswordAttempts=\"1000\"
,但是如果您一直在使用配置,也许您在更改设置之前就将自己锁定了。     

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...