Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Error while reading Custom elements in App.config

$
0
0

Hi,

<sectionGroup name="propertyMappings" type="System.Configuration.PropertyMappingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" ><section name="ClientApp.My.csvMappings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /></sectionGroup><propertyMappings><ClientApp.My.csvMappings><File_Number>File Number</File_Number><Type>Type &gt; Employee Type (w/o path)</Type></ClientApp.My.csvMappings></propertyMappings >

My xml file looks like above. I want to read all the values from my custom tag csvMappings. My vb.net code to read this is

System.Configuration.ConfigurationManager.GetSection("propertyMappings/ClientApp.My.csvMappings")

But, when the code hits this line, I get Unrecognized element "File_Number" error.

Can someone please help me out?


AC


Viewing all articles
Browse latest Browse all 12583

Trending Articles