Yesterday I used aspnet_regiis
in order to encrypt my web.config
and my applicatoin run fine. Today I had to restart the server and my application did not run anymore:
System.Configuration.ConfigurationErrorsException: Failed to decrypt using provider 'DataProtectionConfigurationProvider'.
Error message from the provider: Key not valid for use in specified state. (Exception from HRESULT: 0x8009000B)
So I tried to reconfigure it with the following command:
C:\Windows\Microsoft.net\Framework\v4.0.30319\ASPNET_REGIIS –pef "secureAppSettings" "E:\Program Files\MyProject" -prov DataProtectionConfigurationProvider
It shows its options, as I run it without or wrong parameters I did some test and it always shows them, no matter which parameter/value I pass. I get no errors.
If I run the commands on my local machine, they work.
What's wrong?
User contributions licensed under CC BY-SA 3.0