如果更改 app.config 是否必须重新启动 Windows 服务? [英] Do you have to restart a windows service if you change the app.config?

查看:30
本文介绍了如果更改 app.config 是否必须重新启动 Windows 服务?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果更改了 app.config,是否需要重新启动 Windows 服务?

Do you have to restart a windows service if you change the app.config?

推荐答案

是的,你这样做:

.Net 框架将读取 app.config 一次,并且永远不会再接触 app.config.这就是为什么您必须重新启动应用程序才能接受更改.

.Net framework will read the app.config once, and never touch the app.config again. That is why you have to restart the application to pick up the change.

.Net 框架为什么没有检测到 app.config 发生变化,并刷新所有配置数据?

Why does not .Net framework detect that app.config has changed, and refresh all the config data?

原因很简单,一般情况下这是不可能的.

The reason is simple, this is not possible in general.

让我们在这里使用 Raymond 的想象一下可以做到"的逻辑...

Let’s use Raymond’s "imagine this could be done" logic here...

这篇关于如果更改 app.config 是否必须重新启动 Windows 服务?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆