I am trying to read content in the <appsettings> tag in the config file in my windowsservice application. for some reason, I can't get any thing.
FileWatcherService.exe.Config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="FileNameAndPath" value="C:\Code\SavvysoftValuations" />
</appSettings>
</configuration>
Code to read:
_FilePath = System.Configuration.ConfigurationSettings.AppSettings.Get("FileNameAndPath");


Reply With Quote