encrypting web.config settings for a configSection RRS feed

  • Question

  • Hello,

    I have to encrypt a sections of a web.config with some sections. There is a sample of what the config looks like:
    <sectionGroup name="EntitySpaces" type="EntitySpaces.Interfaces.esConfigSettings, EntitySpaces.Core">
          <section name="connectionInfo" type="EntitySpaces.Interfaces.esConfigSettings, EntitySpaces.Interfaces" allowLocation="true" allowDefinition="Everywhere" restartOnExternalChanges="true" />


        <connectionInfo default="SQL_SSPI">
            <add name="SQL_SSPI" providerMetadataKey="esDefault" sqlAccessType="DynamicSQL" provider="EntitySpaces.Npgsql2Provider" providerClass="DataProvider" connectionString="..." />

    I am trying to use this command to encrypt the section:
    aspnet_regiis -pef "EntitySpaces" D:\_TeamSystem_VersionControl\nrwa\NRWA.Services -prov "CustomProvider"

    But it gives this message:
    The configuration section 'EntitySpaces' was not found.

    If I run the command to encrypt the appSettings, it works. It there a way to encrypt these custom configSections?



    Wednesday, May 1, 2013 6:53 PM


All replies