PDA

View Full Version : Changed machine -RSA trouble


OLTernative
05-27-2010, 05:53 AM
Hi,
I've got a new development machine and transferred my project files across from my old one. However, one thing that slipped my mind was the RSA Encryption Keys. When I try to run my project on the new machine, I get an error saying

"Failed to decrypt using provider 'MyRsaProtectedConfigurationProvider'. Error message from the provider: The RSA key container could not be opened."

I've still got the exported RSA xml file from step 2 in the RSA kb (http://support.discountasp.net/KB/a335/how-to-install-your-rsa-keys-webconfig-encryption-on.aspx). Can I somehow use this? I tried importing it using the command:

aspnet_regiis -pi "MyRsaProtectedConfigurationProvider" "C:\NetFrameworkConfigurationKey_username.xml" ('username' is replaced with my real one).

It says that it's imported successfully, but I still get the error message. Is there a step I've missed?
Thanks

OLTernative
05-27-2010, 07:50 AM
Ah problem fixed. I gave permission to the file using 'aspnet_regiis -pa' and now it's working!

mjp
05-27-2010, 10:51 AM
Cool, glad it works. Thanks for posting the follow up.