Gabriele Riontino
Gabriele Riontino

Reputation: 1

service not reloading config file

I developed a windows service using Visual Studio 2012. This service has a config file. When the application is build, the config file takes the name of the exe + .config. If I install the service everything works, it means that the service uses the settings in the config file. If I want to change a value in the config file and I restart the service, it does not read the new values, but it is still using the original values.

It looks like if the config file is copied in a different location when I install the service and the config file is not used anymore. Why? Where is the config file that service reads?

Upvotes: 0

Views: 238

Answers (2)

rudy
rudy

Reputation: 191

this should work as you describe. you just have to be sure that you modify the correct .config file.

To check where your app resides, open the windows task-manager, right-click your exe and click 'properties'. here you can see the folder you app is running

Upvotes: 0

VladL
VladL

Reputation: 13043

If you use .NET settings which you create in Visual Studio, then they are saved under

c:\Users\{Username}\AppData\Local\{AppName}\

Upvotes: 1

Related Questions