C # app.config problem - ConfigurationErrorsException: unrecognized 'install' element

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.

+4
source share
1 answer

Are you 100% sure that the production environment is on the same version of .NET as your others? If the same code (are you sure that all assemblies were discarded correctly?) It works correctly in 5 environments and gets confused during the production process, it looks like it could be an environmental problem.

Is it possible that - gah - your prod environment only has access to .NET 1.1? Or that the web service in question was included in 1.1 AppPool in IIS? (Although it seems that the problem is not in the web service, but in the Windows service, which should solve the last question ...)

0
source

All Articles