IIS7 管理器不维护 configSource 引用

发布于 2024-09-06 21:27:16 字数 291 浏览 1 评论 0原文

我使用 ConfigSource=localfile 将连接字符串保存在生产服务器上的单独文件中。这很好用。

但是,如果您使用 IIS7 管理器编辑服务器上的连接字符串,这些字符串最终会返回到 web.config 中。当新的 web.config 到达时,后续部署将丢弃这些编辑。

II7,如果它编辑您的连接(或应用程序设置)字符串,应该将它们放回到它们来自的文件中。

不?

事实上,甚至似乎在这个序列中的某个地方,原始本地文件被截断(仅截断为 xml 文件中的标题行)...然后在下一次部署后出错。

I use ConfigSource=localfile to keep my connectionstrings in a separate file on the productiton server. This works great.

But if you use IIS7 Manager to edit connectionstrings on the server, the strings end up back in the web.config. Subsequent deployments then trash those edits when the new web.config arrives.

II7, if it edits your connection (or appsettings) strings, should put them back in the file from whence they came.

no?

Indeed, it even seems that somewhere in this sequence the original localfile gets truncated (to just the header line in an xml file) ... which then errors out after the next deployment.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文