IIS7 管理器不维护 configSource 引用
我使用 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论