开发者

Login Control suddenly stopped working

开发者 https://www.devze.com 2023-03-19 12:19 出处:网络
Here is my connection string: <add name=\"modelConnectionString\" connectionString=\"Data Source=.\\SQLEXPRESS;AttachDbFilename=\'D:\\Documents and Settings\\Dima\\My Documents\\Visual Studio 2010

Here is my connection string:

  <add name="modelConnectionString" 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;Trusted_Connection=Yes;" providerName="System.Data.SqlClient"/>

Here is my membership config section

<membership defaultProvider="MyMembershipProvider">
  <providers>
    <clear/>
    <add name="MyMembershipProvider" type="System.Web.Security.SqlMembershipProvider"
         connectionStringName="modelConnectionString"
         minRequiredPasswordLength="1"
         minRequiredNonalphanumericCharacters="0" 
         enablePasswordReset="true"
         maxInvalidPasswordAttempts="1000" 
         passwordAttemptWindow="4000" 
         enablePasswordRetrieval="true" 
         requiresUniqueEmail="false" 
         passwordFormat="Encrypted" 
         applicationName="/WebSite10"/>
  </providers>
</membership>

I was searching in google for 2 hours and found nothing related that would开发者_开发问答 solve this issue. The control worked for 2 months and then stopped suddenly


for sql membership to work you need to register the sql database for membership.

Make sure you execute aspnet_regsql.exe -A m -E from the command line

full instructions here


Since you are using a SQL User Instance, did you change the identity of the site's application pool in IIS? Or if you are using the development server, are you logged in as a different user?

See: SQL Server 2005 Express Edition User Instances


If you are getting the message you posted above then I would guess your membership provider is working properly with the DB, and the problem lies within the actual aspnet membership tables in the database.

First if you don't already have it, get Microsoft SQL Server Management Studio Express so you can work with your MDF file.

Then you can look for issues in the dbo.aspnet_Users table, and execute stored procedures such as aspnet_Users_CreateUser and aspnet_Users_DeleteUser.

If you run into something that looks abnormal in there, just update your question and I'll take a look at it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号