Restore Encryption Key Problem

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
katasidy
Ensign (ENS)
Ensign (ENS)
Posts: 6
Joined: Thu Jun 09, 2011 12:04 pm

Restore Encryption Key Problem

Post by katasidy » Wed Jun 15, 2011 9:32 pm

I've moved a 7.0 ablecommerce install to a different server and the site is working fine however restoring the backup keys from the other server is not working. I'm getting the message below:

Failed to decrypt using provider 'DataProtectionConfigurationProvider'. Error message from the provider: Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B) (c:\inetpub\vhosts\ATYOURDOORPETSTORE.COM\httpdocs\App_Data\encryption.config line 2)

I don't understand what it's trying to decrypt since it should just be restoring the encryption key from the two backup files. There currently is not any backup encryption key set on the new install if that makes any difference.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Restore Encryption Key Problem

Post by AbleMods » Fri Jun 17, 2011 7:55 am

katasidy wrote:I don't understand what it's trying to decrypt
Encryption keys are used to decrypt payment data stored in the database. if you are not storing payment details i.e. you have the storefront set to NOT store credit card information, you can skip restoring the encryption keys.
katasidy wrote: Error message from the provider: Key not valid for use in specified state.
The error message sounds as if the backup key files are somehow corrupt. The error message you got is common when the encryption key being restored is too large. The only way (I can think of) for the restored key to be too large is that the backup file is messed up, corrupted, incorrect etc.

If you don't restore backup encryption keys, you won't be able to capture funds on pending authorizations. If you didn't have any outstanding authorizations when you moved the site, restoring the keys isn't necessary.

Don't forget to generate (and back up) new encryption keys on the new install.
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

katasidy
Ensign (ENS)
Ensign (ENS)
Posts: 6
Joined: Thu Jun 09, 2011 12:04 pm

Re: Restore Encryption Key Problem

Post by katasidy » Fri Jun 17, 2011 8:09 am

I figured out the problem. Basically the encryption.config file has to have nothing in it except the encryption tag. I had just copied over the existing store so the existing encryption.config file was being used. Once I copied over the encryption.config from the install folder the restore worked.

User avatar
AbleMods
Master Yoda
Master Yoda
Posts: 5170
Joined: Wed Sep 26, 2007 5:47 am
Location: Fort Myers, Florida USA

Re: Restore Encryption Key Problem

Post by AbleMods » Fri Jun 17, 2011 8:11 am

katasidy wrote: Once I copied over the encryption.config from the install folder the restore worked.
Glad you got it figured out, thanks for sharing your solution !
Joe Payne
AbleCommerce Custom Programming and Modules http://www.AbleMods.com/
AbleCommerce Hosting http://www.AbleModsHosting.com/
Precise Fishing and Hunting Time Tables http://www.Solunar.com

Post Reply