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. 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 -->
<add name="YourGuruDB" connectionString="Data Source=DIMA-00AA1DA557;Initial Catalog=model;Integrated Security=True"/>
<add name="modelConnectionString" connectionString="Data Source开发者_JAVA技巧=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? What errors are you getting?
You should find in your ConnectionString section something like:
<add name="LocalSqlServer" connectionString="<YourConnectionString>" providerName="System.Data.SqlClient"/>
And did you enabled 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.
精彩评论