We use a custom configuration section (via NameValueConfigSection) to contain our settings. These settings are derived from the web.config interface via configSource.
So, the entries in web.config look something like this:
<configSections> <section name="customSettings" type="System.Configuration.NameValueSectionHandler" /> </configSections> <customSettings configSource="config\customSettings.config" />
We want to encrypt this customSettings.config file on our production server, so run this command as recommended by Microsoft (here: http://msdn.microsoft.com/en-us/library/zhhddkxy.aspx )
aspnet_regiis -pe customSettings -site 4 -app /
And this gives the following result:
Encrypting configuration section... Succeeded!
However, this fails at all, leaving the file exactly as
(by the way, this command works if the encryption of a non-standard section, for example, the externalised connectionStrings section)
I was able to write a small console application that works fine, but we really want to use standard tools to perform a standard operation - can someone tell me if this is a limitation or where I'm going wrong?
Thanks:)
source share