简体   繁体   中英

Unrecognized configuration section applicationSettings

My app runs fine on development PC, but when I start it on a client PC, I get an exception: "Configuration System failed to initialize", with innerException msg = "Unrecognized configuration section applicationSettings" I have checked my config file against all solutions I could find on the Internet, but it seems OK. Any thoughts or suggestions would be much appreciated. The config file is below.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
    <configSections>
    <sectionGroup name="userSettings" type="System.Configuration.UserSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
        <section name="KIM.Eplex.PCMU.PLayer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
        <section name="EplexPCMU.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" allowExeDefinition="MachineToLocalUser" requirePermission="false" />
    </sectionGroup>
    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
        <section name="KIM.Eplex.PCMU.PLayer.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
    </sectionGroup>
</configSections>

    <userSettings>
    <KIM.Eplex.PCMU.PLayer.Properties.Settings>
        <setting name="DataTransferPath" serializeAs="String">
            <value />
        </setting>
        <setting name="DiagnosticLockTypeIndex" serializeAs="String">
            <value>0</value>
        </setting>
        <setting name="SystemType" serializeAs="String">
            <value>2</value>
        </setting>
        <setting name="NumAuditEvents" serializeAs="String">
            <value>100</value>
        </setting>
        <setting name="AuditStartAt" serializeAs="String">
            <value>0</value>
        </setting>
    </KIM.Eplex.PCMU.PLayer.Properties.Settings>
    <EplexPCMU.Properties.Settings>
        <setting name="centre" serializeAs="String">
            <value>200, 200</value>
        </setting>
    </EplexPCMU.Properties.Settings>
</userSettings>
<applicationSettings>
    <KIM.Eplex.PCMU.PLayer.Properties.Settings>
        <setting name="DiffProgEnabled" serializeAs="String">
            <value>0</value>
        </setting>
    </KIM.Eplex.PCMU.PLayer.Properties.Settings>
</applicationSettings>
</configuration>

If it works on your development machine, then there is a problem with the sectionGroup registration. You have the applicationSettings group registered to the type System.Configuration.ApplicationSettingsGroup .

Check the target machine for the System.Configuration assembly and make sure the version matches the version you have in the sectionGroup registration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM