[英]asp.net login control doesnt work
I put a login control and it wont let me inside the site.我放了一个登录控件,它不会让我进入网站。 (I even tried to use login control to retrieve and reset password. still wont work).
(我什至尝试使用登录控制来检索和重置密码。仍然无法正常工作)。
Here is a section of my web.config file.这是我的 web.config 文件的一部分。 Yesterday, i fixed that issue by changing the properties in the add tag..but today the problem repeats itself.
昨天,我通过更改添加标签中的属性解决了这个问题。但今天问题再次出现。
http://go.microsoft.com/fwlink/?LinkId=169433 --> 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>
Does "LocalSqlServer" exists as connection string? “LocalSqlServer”是否作为连接字符串存在? What errors are you getting?
你得到什么错误?
You should find in your ConnectionString section something like:您应该在 ConnectionString 部分找到类似的内容:
<add name="LocalSqlServer" connectionString="<YourConnectionString>" providerName="System.Data.SqlClient"/>
And did you enabled FormsAuthentication?您是否启用了 FormsAuthentication?
<authentication mode="Forms">
<forms loginUrl="<YourLoginPage>" timeout="2880"/>
</authentication>
Are you resetting the password or being emailed your actual password?您是在重置密码还是通过电子邮件发送您的实际密码? Have you checked the Membership table to make sure that you have not been locked out?
您是否检查了成员资格表以确保您没有被锁定?
I can see you have maxInvalidPasswordAttempts="1000"
but if you have been playing about with the config the maybe you locked yourself out before changing the settings.我可以看到您有
maxInvalidPasswordAttempts="1000"
但如果您一直在玩配置,那么您可能会在更改设置之前将自己锁定。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.