I want to encrypt common.config, not the Web.config file. Common.config is in a different location than the web.config. The web.config file is connected to the common.config.
web.config:
<appSettings file="C:\Users\ja\Documents\common.config">
<add key="webpages:Version" value="3.0.0.0" />
<add key="webpages:Enabled" value="false" />
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
common.config:
<appSettings>
<add key="myKey" value="This is the Value"/>
</appSettings>`
This works for the web.config file:
aspnet_regiis.exe -pef appSettings c:\Users\ja\Desktop\test\webapp\webapp -prov "RsaRpotectedConfigurationProvider"
But when I try to encrypt the common.config file:
aspnet_regiis.exe -pef appSettings c:\Users\ja\Document\ -prov "RsaRpotectedConfigurationProvider"
I get this error:
The configuration for physical path 'c:\Users\ja\Document\' cannot be opened