Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

c# windows service config file

I have created a C# .net Windows Service that has a config file.

I am reading the settings of the config file from my code using

string setting1 = Properties.Settings.Default.setting1;

If I change the value of setting1 directly in the .config file of the Windows Service for some reason it maintains the value that I had set for it at design time, in the Settings Dialog of the Project.

I do not understand what I am doing wrong ..

Thanks

like image 451
G-Man Avatar asked Feb 06 '10 17:02

G-Man


1 Answers

You have the settings as User scope in place of Application scope.

The user scope settings are in user AppData folder. You can delete it in the AppData folder of the user under whose credentials the windows service runs.

like image 126
Rohit Avatar answered Oct 21 '22 22:10

Rohit