Some prerequisites: I have a Windows service with 5 web links, everything works fine in several Dev, Test, QC environments. Dev and Test are running Windows 2003, QC and PROD windows 2000. We pushed the service to production with the same set of builds and configuration files and we get this error. The exception does not match the same code block. Other web links work with the same standard configuration items.
Exception :
System.Xml.XmlDocumentSystem.Configuration. ConfigurationErrorsException: Unrecognized element 'setting'
Examples of configuration sections:
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > <section name="Blah.AWD.SubSystem.AUE.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> </sectionGroup> <applicationSettings> <Blah.AWD.SubSystem.AUE.Properties.Settings> <setting name= "AWD_SubSystem_AUE_WebService_Validator_AppEntryValidator" serializeAs="String"> <value>http://blah.asmx</value> </setting> </Blah.AWD.SubSystem.AUE.Properties.Settings> </applicationSettings>
I agree that John’s answer is correct because it turned out to be a deployment problem and was specific to the environment. Nothing happened with the configuration.
An exception:
System.Xml.XmlDocumentSystem.Configuration. ConfigurationErrorsException
occurs if you put an element in your config, which is not recognized and cannot be serialized from a custom configuration class.
source share