When trying to decrypt an old application's web config using ASPNET_REGIIS -pdf I get the error, 'Failed to decrypt using provider 'RsaProtectedConfigurationProvider'. Error message from the provider: The parameter is incorrect.'
I am able to encrypt and decrypt the web config using ASPNET_REGIIS -pef/-pdf when pulled from version control where the web.config is stored unencrypted. I notice that when I encrypt it myself, the EncryptionMethod Algorithm="" is different.
Is there a way to set the algorithm from the command line? Is that even the issue here? I assumed ASPNET_REGIIS would read the link and decryption would proceed automatically and setting the algorithm manually would not be needed. So, how can I resolve this error? What is causing this error?