473,804 Members | 2,931 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does 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" ?>
<configuratio n>
<appSettings>
<add key="RpcQmsTrac e" value="Off" />
<add key="RpcBizTalk Trace" value="Off" />
<add key="RemotingSe rverFlood" value="xxxxxx"/>
</appSettings>
<applicationSet tings>
<COMPANY.SYSTEM .Properties.Set tings>
<setting name="SYSTEM_QM SWS_QMSws"
serializeAs="St ring">
<value>xxxxxx </value>
</setting>
<setting name="SYSTEM_BT WS_ManualReceiv ePort"
serializeAs="St ring">
<value>xxxxxx </value> </setting>
</COMPANY.SYSTEM. Properties.Sett ings>
</applicationSett ings>
<configSections >
<sectionGroup name="applicati onSettings"
type="System.Co nfiguration.App licationSetting sGroup,
System, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9" >
<section name="COMPANY.S YSTEM.Propertie s.Settings"
type="System.Co nfiguration.Cli entSettingsSect ion,
System, Version=2.0.0.0 ,
Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9"
requirePermissi on="false" />
</sectionGroup>
</configSections>
</configuration>

Whereas this works:

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<configSections >
<sectionGroup name="applicati onSettings"
type="System.Co nfiguration.App licationSetting sGroup,
System, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9" >
<section name="COMPANY.S YSTEM.Propertie s.Settings"
type="System.Co nfiguration.Cli entSettingsSect ion,
System, Version=2.0.0.0 , Culture=neutral ,
PublicKeyToken= b77a5c561934e08 9" requirePermissi on="false"
/>
</sectionGroup>
</configSections>
<applicationSet tings>
<COMPANY.SYSTEM .Properties.Set tings>
<setting name="SYSTEM_QM SWS_QMSws"
serializeAs="St ring">
<value>xxxxxx </value>
</setting>
<setting name="SYSTEM_BT WS_ManualReceiv ePort"
serializeAs="St ring">
<value>xxxxxx </value>
</setting>
</COMPANY.SYSTEM. Properties.Sett ings>
</applicationSett ings>
<appSettings>
<add key="RpcQmsTrac e" value="On" />
<add key="RpcBizTalk Trace" value="On" />
<add key="RemotingSe rverFlood" value="xxxxxx"/>
</appSettings>
</configuration>

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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1851
by: Søren Lund | last post by:
Hello, I have implemented a custom config section handler by implementing the IConfigurationSectionHandler interface. I have registered this handler in web.config and everything works fine ... for a while. At random points in time my section handler stops working and throws the exception: Configuration Error Description: An error occurred during the processing of a configuration
4
1947
by: johnbdh | last post by:
Due to real ds mistake on my part IIS was inadvertently uninstalled on my web server. After reinstalling IIS, I have been able to get everything back up except ASP.net. Any page served using ASP.net returns the generic Runtime Error page.... Server Error in '/Qmcfm' Application. ------------------------------------------------------------------------ Runtime Error
8
34673
by: Subra Mallampalli | last post by:
Hi, I am trying to use <runtime> section within the web.config file. However, the contents of the <runtime> section seem to be ignored. What am i missing here? Is <runtime> section not used by web apps? Any help is greatly appreciated. Thanks,
5
2888
by: rogsonl | last post by:
My computer was moved last week, and the company changed the network groups we work on. As a result, one of the main benefits from Whidbey (database connectivity) no longer works. Situation: 1. I open a new project based on a windows form 2. I click on "data" and then "Add New Data Source" then I click on next within the wizard 3. I have 3 choices Database, Local Database, Web service and Object. 4. I choose Database, click next and get...
3
11709
by: mwt | last post by:
I want to set default values for a ConfigParser. So far, its job is very small, so there is only one section heading, . Reading the docs, I see that in order to set default values in a ConfigParser, you initialize it with a dictionary or defaults. However, I'm not quite sure of the syntax to add the section headings in to the dictionary of defaults. For now, I'm doing it like this: default_values = {'username' : 'put username here',...
0
1199
by: Thirsty Traveler | last post by:
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>
10
9473
by: Ryan | last post by:
I've created a custom configuration section that inherits (naturally) from System.Configuration.ConfigurationSection. The configuration section is working 99% fine, however I keep coming across a ConfigurationErrorException whenever I do the following: 1. Modify and save the section in code using the System.Configuration.Configuration.Save(). 2. Refresh teh section using ConfigurationManager.RefreshSection 3. Encrypt the section,...
2
7605
by: ken | last post by:
We have a user that has reported the following error when starting up our client application that uses a web service on our back end: System.Configuration.ConfigurationException: Missing required Web Services section of the Web.config file. at System.Web.Services.Configuration.WebServicesConfiguration.get_Current() at System.Web.Services.Protocols.SoapClientType..ctor(Type type) at...
1
15523
by: Shannon Richards | last post by:
Hello All: I have implemented a custom configuration section in my app.config file as follows: <configSections> <section name="AdminUIConfig" type="TestMgr.UIConfigSection,TestMgr"/> </configSections> <AdminUIConfig name="Admin" caption="Administrator" captionLC="administrator">
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9577
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10569
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10325
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10315
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5519
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.