.NET Configuration (app.config/web.config/settings.settings)

后端 未结 13 1252
广开言路
广开言路 2020-11-29 14:41

I have a .NET application which has different configuration files for Debug and Release builds. E.g. the debug app.config file points to a development SQL Server which has d

相关标签:
13条回答
  • 2020-11-29 15:41

    My current employer solved this issue by first putting the dev level (debug, stage, live, etc) in the machine.config file. Then they wrote code to pick that up and use the right config file. That solved the issue with the wrong connection string after the app gets deployed.

    They just recently wrote a central webservice that sends back the correct connection string from the value in the machine.config value.

    Is this the best solution? Probably not, but it works for them.

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