I've done the following in order to encrypt the web.config using RSA provider.
RDP to Web Server and opened the VS Command Prompt with my account.
Create a custom RSA encryption key:
aspnet_regiis -pc "MyKey" -exp
Encrypt the connectionStrings section using the custom RSA key:
aspnet_regiis.exe -pef "connectionStrings" "D:\Web\" -prov "MyRsaProvider"
I can see that the web.config has been encrypted. However when I try to load the web page it throws an error below:
"....The RSA key container was not found."
I then tried these commands one by one and tested:
aspnet_regiis -pa "MyKey" "domain\appPool_serviceAccount"
aspnet_regiis -pa "MyKey" "ASPNET"
aspnet_regiis -pa MyKey" IIS APPPOOL\CRSAppPool" -full
aspnet_regiis -pa "MyKey" "NT Authority\Network Service"
And, I still get this error:
"....The RSA key container was not found."
Could some one please help me whether it's a framework bug or am I doing something not right?