.NET Service Config File Location

谁都会走 提交于 2020-02-05 10:16:45

问题


Kind of a silly question- but can someone point me to where the config file for a .NET-based Windows service gets placed? I'm using installutil to install the service, and it's able to read from its config file just fine, but a search of the disk hasn't revealed where the file was installed to.

I need to know because I want to edit the config file without reinstalling the service.


回答1:


installutil doesn't move the assembly. So if you run installutil on C:\Foo\Bar\MyService.exe, it's going to read the configuration from C:\Foo\Bar\MyService.exe.config.

Of course, you'll have to restart the service after changing the config. Shouldn't need to reinstall it, though.



来源:https://stackoverflow.com/questions/17154936/net-service-config-file-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!