I’m using
Here’s the config file:
I’ve seen this issue all over Google, but nothing that’s helped me solve the issue yet.
Thanks,
Eliezer
System.Configuration.ConfigurationManager.GetSection
to read a custom configuration section from an App.config. If I have two nodes that contain an identical value (such as the two “Station” nodes, below, with the identical highlighted values) – which is a project requirement – I get the error below when method GetSection is called.The entry 'C:\Local_folder_path_goes_here' has already been added.
Here’s the config file:
XML:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<configSections>
<section name="StationsSection" type="TV_EcFtpClient.StationConfigurationSection, TV_EcFtpClient"/>
</configSections>
<StationsSection>
<Stations>
<add FtpHostname ="ftp://upload.acmeCompany.com/" DestinationFolderPath="[highlight #FCE94F]C:\Local_folder_path_goes_here[/highlight]" FtpFolderPath="acme_ftp/SourceFolder/" FtpUsername="fred" FtpPassword="fr3d$p@sswurd" FtpTimeoutInSeconds="30"/>
<add FtpHostname ="ftp://upload.acmeCompany.com/" DestinationFolderPath="[highlight #FCE94F]C:\Local_folder_path_goes_here[/highlight]" FtpFolderPath="acme_ftp/SourceFolder/" FtpUsername="fred" FtpPassword="fr3d$p@sswurd" FtpTimeoutInSeconds="30"/>
</Stations>
</StationsSection>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
</startup>
<appSettings>
<add key="NameOfService" value="ECClient"/>
<add key="PollingFrequencyInSeconds" value="60"/>
</appSettings>
</configuration>
I’ve seen this issue all over Google, but nothing that’s helped me solve the issue yet.
Thanks,
Eliezer