I am trying to use an external configuration file to define several items locationin the root section of <configuration>my web.config file. Is it possible?
I understand how to do this for one section (for example, connectionStrings), but can it be done for several elements in a configuration item? <configuration>; the attribute itself does not allow configSource. Is it possible to create a dummy element and define it in configSections, if so, what type do I give it?
Background information: I want to do this to determine persistent redirects, there can be hundreds of them, so I don’t want to define this in web.config itself. i.e.
<configuration>
<location path="oldpage">
<system.webServer>
<httpRedirect enabled="true" destination="/uk/business" httpResponseStatus="Permanent" />
</system.webServer>
</location>
</configuration>
source
share