I have been looking in the web.config at some legacy code, where under most of the group sections before each <add...>
a <remove...>
was added, for example:
<connectionStrings>
<remove name="abcDb" />
<add name="abcDb" connectionString="..." providerName="System.Data.SqlClient" />
</connectionStrings>
If the section was added in the machine config file for some bizarre reason, is it not enough to just add the same section again and this gets overwritten?
Unless I'm missing a trick, why would we <remove>
and then <add>
and not just <add>