Luke101
Luke101

Reputation: 65238

ASP.NET membership trouble

I have 2 computers that I work on. I have a development 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?

Upvotes: 0

Views: 107

Answers (2)

Jim Dagg
Jim Dagg

Reputation: 2032

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.

Upvotes: 0

BrokenGlass
BrokenGlass

Reputation: 160852

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"/>

Upvotes: 3

Related Questions