.NET Service Config File Location

2019-08-02 00:49发布

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条回答
Explosion°爆炸
2楼-- · 2019-08-02 01:29

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.

查看更多
登录 后发表回答