3

I'm using aspnet_regiis.exe to encrypt connectionStrings in a web.config file for a WCF Restfull service using the following command

aspnet_regiis.exe -pef connectionStrings C:/pathToWebConfig

The service is hosted as an application under a different IIS deployment so we had to add a remove tag due to the parent config containing the same connectionString

  <connectionStrings>
    <remove name="foo"/>
    <add name="foo" connectionString="..." />
  </connectionStrings>

The encryption is working fine accept that it removes the remove tag causing the application to fail. Decryption confirms that the remove tag is gone.

Apart from code changes to fix this, is there a way to instruct the encryption not to remove the tag?

0 Answers0