I encrypt web.config on our sites using aspnet_regiis. However, I want the ability to export the encryption key, so if we need to switch from Machine A to Machine B, asp.net will be able to decrypt it.
When I run aspnetregiis -px "NetFrameworkConfigurationKey" c: \ keys.xml -pri, I get the following: "The key is not valid for use in the specified state." I have seen all kinds of answers on the Internet, but they don't seem to apply. This is not an invalid key, because when I use aspnet_regiis to encrypt the web.config sections, they encrypt the penalty.
Ideas?
source
share