开发者

ASP.NET membership trouble

I have 2 computers that I work on. I have a develop开发者_运维百科ment computer and I have have a production server at Rackspace cloud. When I backed up my membership database then restored it to the production server I can no longer login to the asp.net membership system. It is no longer recognizing my passwords for users.

I have reversable encryption on passwords.

Do I need to copy and paste the machine.config file from my development machine to production?


If the encryption is dependent on the machine.key you can override it in the web.config of your application by adding a machineKey entry - this will guarantee you are using the same value on both your dev machine and the production machine:

<machineKey validationKey="yourkeyhere" decryptionKey="yourdecryptionkeyhere" validation="SHA1" decryption="AES"/>


In order to get the same result from password encryption/hashing, the machinekey/validationkey and the record's PasswordSalt must be identical. Those values are used in the encryption process. Verify that the value for validationkey is the same on both your development and live server, and that it isn't set to autogenerate.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜