- Windows Configuration Settings
- Mosquitto Windows Service Config File
- Encrypt Windows Service Config File
Active6 years, 1 month ago
This article's sole purpose is to provide information regarding the services that your Windows VPS may utilize. Below, you will find the services' configuration and log file locations, which may be useful in troubleshooting errors on your VPS. Sep 27, 2018 Windows also includes PowerShell and Bash, and third party command shells are also available for Windows and may be configured as the default shell for a server. To set the default command shell, first confirm that the OpenSSH installation folder is on the system path. Jan 09, 2018 Web config file location Windows Server Please use technology-specific Windows Server forums for areas like File Server and Storage, High Availability (Clustering), Directory Services, etc. The file you selected will open in WordPad allowing you to edit it. When you are ready to save the file, click “File” “Save” to save the configuration file. The changes to the configuration file will be saved successfully. However, the service will need to be restarted before the new settings will take effect.
I've developed a windows service application using Visual Studio 2008 / C#.
I have an app.config file in the project. When installed, the app.exe.config file appears beside the executable but it appears not to be reading the values from it when I try to access them through ConfigurationManager.AppSettings.
Has it copied the config file elsewhere or is there some other problem I don't know about?
Thanks in advance,
Martin.
Edit:The config file name is infact my_exe_file_name.exe.config, it looks like:
and I am trying to read via:
The debug value I continually see is '1' and not '3'. Am I doing something wrong here?
ДМИТРИЙ МАЛИКОВ15.4k99 gold badges6060 silver badges118118 bronze badges
Martin
6 Answers
I located the error and it was related to file permissions. After installing the service, my local user account didn't have access to modify the app.exe.config file.
The tool I was using to edit was not informing me it was being denied access to save the file - that's notepad++ if anyone is interested - so I couldn't see that it wasn't saving over the old config file.
Solved now, thanks everyone.
Martin
When you are in debug mode check and see what settings are in the my_exe_file_name.vshost.exe.config Also make sure you adjust this in the app.config file. Visual studio should update the final config file in your bin/debug folders.
Aaron FischerAaron Fischer12.9k1717 gold badges6464 silver badges105105 bronze badges
Maybe you are updating the wrong config file. You should double check that using
Windows Configuration Settings
Igor ZelayaMosquitto Windows Service Config File
Igor Zelaya3,05944 gold badges2727 silver badges4949 bronze badges
Encrypt Windows Service Config File
Generally for the Windows Services that I write, i drop the appName.exe.config file into C:WINDOWSsystem32
Perhaps you have an older version in that directory, which is where your service is getting the value, even though you've updated the config file in your project.
Kinematic equations solver. License:. Provided by: Wikipedia. Kinematics.
Dave BaghdanovDave Baghdanov1,30644 gold badges1919 silver badges3333 bronze badges
App.config file should be renamed to your_exe_file_name.exe.config and placed near the exe file.
Alex ReitbortAlex Reitbort12.3k11 gold badge3333 silver badges6060 bronze badges
Is it possible that you have more than one instance of the RuntimeFrequency entry defined? The ConfigurationManager reads the file from top to bottom and processes each setting individually. Therefore, the last value of RuntimeFrequency that is defined in the file is the one it will use.
If you want to know for sure if your file is being used, I would simply remove or comment out any definition for RuntimeFrequency (copy/paste errors do happen) and wait to see an application error when ConfigurationManager attempts to reference an entry in AppSettings that does not exist.
EnocNRoll - Ananda GopalEnocNRoll - Ananda Gopal3,43011 gold badge1818 silver badges2323 bronze badges