I was getting the above error in one of my windows application. Was because of some section getting repeated in the app.config file.
Removing the duplicate section information from the app.config resolved the issue.
Discover more from Nishant Rana's Weblog
Subscribe to get the latest posts sent to your email.

Strange exception for an app.config issue. I understand that duplicate section was database-related?
LikeLike
this won’t work
LikeLike
I just received the exact same error, only mine wasn’t a duplicate section in the app.config. Mine was due to the appSettings section being above my connectionStrings section. Strange, and yeah it makes no sense, but I moved the appSettings to the bottom via cut-paste and the exception goes away.
LikeLike
@john: It worked for me . Thnks
LikeLike
thanks u saved my life.
LikeLike