Is it possible to override both appSettings and connectionStrings in a Local.config file?

前端 未结 1 1356
旧巷少年郎
旧巷少年郎 2021-01-24 23:40

We presently override appSettings from our web.config in a Local.config file for each developer. However we also need to override connection strings, so we access

相关标签:
1条回答
  • 2021-01-25 00:10

    In the main application configuration file, you use the configSource attribute to specify the fully qualified name and location of the external file. This example refers to an external configuration file named connections.config.

    <?xml version='1.0' encoding='utf-8'?>
    <configuration>
        <connectionStrings configSource="connections.config"/>
    </configuration>
    

    For detailed information, please visit this link on msdn (section: Using External Configuration Files)

    0 讨论(0)
提交回复
热议问题