I m trying to use an external configuration file to define multiple location
elements within the the root <configuration>
section of my web.config file. Is this possible?
I understand how to do this for a single section (e.g. connectionStrings
) but can this be done for multiple elements within the configuration element? <configuration>
; itself doesn t allow the configSource
attribute. Is it possible to create a dummy element and define it in configSections
, if so what type do I give it?
背景资料: 我希望这样做,以便我能够确定永久的方向,其中可能有数百人最理想的是,我不想在网上界定这一点。 conf。 i.e.
<configuration>
<!-- rest of web.config here -->
<!-- i need mutiple location elements so want these in an external file-->
<location path="oldpage">
<system.webServer>
<httpRedirect enabled="true" destination="/uk/business" httpResponseStatus="Permanent" />
</system.webServer>
</location>
</configuration>