470,849 Members | 1,135 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

Does the section order matter in a config file?

For some reason, a config file similar to the following config file was
throwing an error:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="RpcQmsTrace" value="Off" />
<add key="RpcBizTalkTrace" value="Off" />
<add key="RemotingServerFlood" value="xxxxxx"/>
</appSettings>
<applicationSettings>
<COMPANY.SYSTEM.Properties.Settings>
<setting name="SYSTEM_QMSWS_QMSws"
serializeAs="String">
<value>xxxxxx</value>
</setting>
<setting name="SYSTEM_BTWS_ManualReceivePort"
serializeAs="String">
<value>xxxxxx</value> </setting>
</COMPANY.SYSTEM.Properties.Settings>
</applicationSettings>
<configSections>
<sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGrou p,
System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" >
<section name="COMPANY.SYSTEM.Properties.Settings"
type="System.Configuration.ClientSettingsSection,
System, Version=2.0.0.0,
Culture=neutral,
PublicKeyToken=b77a5c561934e089"
requirePermission="false" />
</sectionGroup>
</configSections>
</configuration>

Whereas this works:

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings"
type="System.Configuration.ApplicationSettingsGrou p,
System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" >
<section name="COMPANY.SYSTEM.Properties.Settings"
type="System.Configuration.ClientSettingsSection,
System, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b77a5c561934e089" requirePermission="false"
/>
</sectionGroup>
</configSections>
<applicationSettings>
<COMPANY.SYSTEM.Properties.Settings>
<setting name="SYSTEM_QMSWS_QMSws"
serializeAs="String">
<value>xxxxxx</value>
</setting>
<setting name="SYSTEM_BTWS_ManualReceivePort"
serializeAs="String">
<value>xxxxxx</value>
</setting>
</COMPANY.SYSTEM.Properties.Settings>
</applicationSettings>
<appSettings>
<add key="RpcQmsTrace" value="On" />
<add key="RpcBizTalkTrace" value="On" />
<add key="RemotingServerFlood" value="xxxxxx"/>
</appSettings>
</configuration>

It seems that the order of the <configuration> sections makes a difference.
Is that true and, if so, why does it matter?
Apr 19 '06 #1
0 1076

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Søren Lund | last post: by
8 posts views Thread by Subra Mallampalli | last post: by
3 posts views Thread by mwt | last post: by
reply views Thread by Thirsty Traveler | last post: by
1 post views Thread by Shannon Richards | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.