I was playing around with how to use the Configuration Manager to read/write custom sections in the App.config file for a WPF application in C#. I read this excellent articl
I got the same error. In my case is due that I have keys in two files, then detect appSettings
tag as duplicated.
if you need conserve some project related keys in web.config and your personalized key in another file (recommended for security reasons), use file
property instead of configSource
.
web.config file:
AppSettings.config file:
Hope it help others!