title: C# app.config problem - ConfigurationErrorsException: Unrecognized element 'setting'
body: <p><strong>Some background:</strong>
  I have a windows service with 5 web references, Everything works great in several environments Dev,Test,QC. Dev and Test are running windows 2003, QC and PROD windows 2000. We pushed the service to production with the same set of assemblies and config files and are receiving this error. The exception is not consistent through the same block of code. Other web reference are working that use the same standard configuration elements.</p>
  
  <p><strong>The exception</strong>:</p>
  
  <pre><code> System.Xml.XmlDocumentSystem.Configuration.
  ConfigurationErrorsException: Unrecognized  
  element 'setting'
  </code></pre>
  
  <p><strong>Example config sections:</strong></p>
  
  <pre><code>&lt;sectionGroup name="applicationSettings"
   type="System.Configuration.ApplicationSettingsGroup, 
   System, Version=2.0.0.0,
   Culture=neutral, PublicKeyToken=b77a5c561934e089" &gt;
        &lt;section name="Blah.AWD.SubSystem.AUE.Properties.Settings"
        type="System.Configuration.ClientSettingsSection, 
        System, Version=2.0.0.0,
         Culture=neutral, PublicKeyToken=b77a5c561934e089" 
        requirePermission="false" /&gt;
  &lt;/sectionGroup&gt;
  
  
  &lt;applicationSettings&gt;
   &lt;Blah.AWD.SubSystem.AUE.Properties.Settings&gt;
    &lt;setting name=
     "AWD_SubSystem_AUE_WebService_Validator_AppEntryValidator"
      serializeAs="String"&gt;
          &lt;value&gt;http://blah.asmx&lt;/value&gt;
    &lt;/setting&gt; 
   &lt;/Blah.AWD.SubSystem.AUE.Properties.Settings&gt;      
  &lt;/applicationSettings&gt;
  </code></pre>
  
  <hr>
  
  <p>I will accept John's answer as being correct because it ended up being a deployment issue and was specific to the environment. Nothing was actually wrong with the config.</p>
  
  <p>The exception:</p>
  
  <pre><code> System.Xml.XmlDocumentSystem.Configuration.
  ConfigurationErrorsException
  </code></pre>
  
  <p>is caused if you put an element in your config that is not recognized and not able to be serialized from the custom configuration class.</p>