简体   繁体   中英

ASP.NET 2.0 Membership database?

I have an application database and an aspnetdb database (generated from the ASP.Net 2.0 framework). I have restored both database from production onto my development environment but I am unable to log on with any of the users credentials that work on production.

So my question is is there anything that ties the aspnetdb database generated by ASP>NET 2.0 Framework to a specific machine?

If anyone has ever restored an aspnetdb database from one machine to another successfully please can they shed light on the variables that need to be the same in order to access all the previous users.

Many Thanks!


Sure I have checked the connection string and double checked users and roles which I can confirm is working by being able to create new users on the development environment and log in with those credentials.

The problem is I am unable to logon with any of the user credentials I use on the live environment. This I feel is related to the difference in the machine.config files on both machines. If anyone knows a variable I should look for in the machine.config then I could make sure they are the same in both environments ie both machines.

The passwords are encrypted with a machine key AFAIK. So you needs to be the same on all places you will be testing this. From what I know, the machine key can set in the web.config.

不看就很难说,但是我会先在web.config中检查您的连接字符串。

I have checked the web.config and connection string and the membership section specifcally the application name as per Scott Gus blog link below:

http://weblogs.asp.net/scottgu/archive/2006/04/22/443634.aspx

Hi I can't see a machine key variable in the web.config I have checked the section and found that both environments web.config files use the same public key token

            <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
        </assemblies>
        <buildProviders>
            <add extension=".rdlc" type="Microsoft.Reporting.RdlBuildProvider, Microsoft.ReportViewer.Common, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
        </buildProviders>

you could check your user credentials. having a backup of the database does not mean you have all the user information. (eg server wide users/roles).

insert on table aspnet_membership and aspnet_users using your previous database table value, where you have encrypted password and you know the real value of that encrypted and using the user name and password you can login the system after that you can change you password.I had the same problem before and i solved like this.

Thanks

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM