473,503 Members | 3,715 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

PLease help Application Configuration file access error ???

dear all,

I have problem accessing section group in my configuration
application file. I got an error saying thta I can have
only one section ????

here is my application configuration looks like:
================================================

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!-- Definition of the application setting
Find here any parameters for the global application
startup phase
key : represent the name of the key to scan
value: represent the actual value of the found key --

<appSettings>
<add key="LogFile" value="TraceLog.txt" />
<add key="LogFilePath" value="C:\" />
</appSettings>

<!-- Definition of the tracing operation
bActivate : Set tracing to ON or OFF (1=ON, 0=OFF)
TraceSeverity : define what type of message level
should be trace based
on TraceLevel (none, info, warning,fatal, verbose =
0,1,2,3,4)
Note that a value of 3 will trace also level 1 and 2
-->
<system.diagnostics>
<switches>
<add name="Enabled" value="1" />
<add name="TraceSeverity" value="1" />
</switches>
</system.diagnostics>

<!-- Definition of the different setting belongng
to each assembly.
Assembly are identify by the group name and
parameter definition are identified by the
section name inside that group
-->
<configSections>
<!-- Definition of the User Management section -->
<sectionGroup name="UserManagement">
<section name="settings"

type="System.Configuration.NameValueSectionHandler " />
</sectionGroup>

<!-- Definition of the Configuration Mangement
section -->
<sectionGroup name="ConfigurationManagement">
<section name="settings"

type="System.Configuration.SingleTagSectionHandler " />
<section name="database"

</sectionGroup>

<!-- Definition of the Language Management section -->
<sectionGroup name="LanguageManagement">
<section name="settings"

type="System.Configuration.SingleTagSectionHandler " />
</sectionGroup>

<!-- Definition of the HMI builder Management
section -->
<sectionGroup name="HMIBuilder">
<section name="settings"

type="System.Configuration.SingleTagSectionHandler " />
</sectionGroup>

</configSections>
<!-- Definition of the User management assembly setting
Parameter define in this section are only used by
UserMangement -->
<UserManagement>
<settings>
<add key="UserName" value="calderara" />
<add key="PassWord" value="Tiphaine" />
<add key="RememberEntry" value="0" />
</settings>
</UserManagement>

<!-- Definition of the Configuration management assembly
setting
Parameter define in this section are only used by
UserMangement -->
<ConfigurationMangement>
<settings>
<add key="ConfigSaved" value="yes" />
<add key="AccessProviderDNS"
value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" />
</settings>

<database>
<add key="Path" value="E:\Configuration data
base" />
<add key="DNS"
value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" />
<add key="sqlserver" value="true" />
</database>
</ConfigurationMangement>

<!-- Definition of the Language management assembly setting
Parameter define in this section are only used by
UserMangement -->
<LanguageMangement>
<settings>
<add key="Default" value="English" />
</settings>
</LanguageMangement>

<!-- Definition of the HMI builder assembly setting
Parameter define in this section are only used by
UserMangement -->
<HMIBuilder>
<settings>
<add key="XPos" value="100" />
</settings>
</HMIBuilder>

</configuration>

Thnaks to help me how can I access my section group.
I have try to use the following to access them but no luck:

Dim nvc As NameValueCollection
nvc = CType(ConfigurationSettings.GetConfig
("UserManagement/settings"), NameValueCollection)

thanks agin for your help
regards

Jul 21 '05 #1
1 2735
PROBLEM SOLVED
-----Original Message-----
dear all,

I have problem accessing section group in my configurationapplication file. I got an error saying thta I can have
only one section ????

here is my application configuration looks like:
=============================================== =

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<!-- Definition of the application setting
Find here any parameters for the global application
startup phase
key : represent the name of the key to scan
value: represent the actual value of the found key - -

<appSettings>
<add key="LogFile" value="TraceLog.txt" />
<add key="LogFilePath" value="C:\" />
</appSettings>

<!-- Definition of the tracing operation
bActivate : Set tracing to ON or OFF (1=ON, 0=OFF)
TraceSeverity : define what type of message level
should be trace based
on TraceLevel (none, info, warning,fatal, verbose =
0,1,2,3,4)
Note that a value of 3 will trace also level 1 and

2 -->
<system.diagnostics>
<switches>
<add name="Enabled" value="1" />
<add name="TraceSeverity" value="1" />
</switches>
</system.diagnostics>

<!-- Definition of the different setting belongng
to each assembly.
Assembly are identify by the group name and
parameter definition are identified by the
section name inside that group
-->
<configSections>
<!-- Definition of the User Management section -->
<sectionGroup name="UserManagement">
<section name="settings"

type="System.Configuration.NameValueSectionHandle r" />
</sectionGroup>

<!-- Definition of the Configuration Mangement
section -->
<sectionGroup name="ConfigurationManagement">
<section name="settings"

type="System.Configuration.SingleTagSectionHandle r" />
<section name="database"

</sectionGroup>

<!-- Definition of the Language Management section --

<sectionGroup name="LanguageManagement">
<section name="settings"

type="System.Configuration.SingleTagSectionHandle r" />
</sectionGroup>

<!-- Definition of the HMI builder Management
section -->
<sectionGroup name="HMIBuilder">
<section name="settings"

type="System.Configuration.SingleTagSectionHandle r" />
</sectionGroup>

</configSections>
<!-- Definition of the User management assembly setting
Parameter define in this section are only used by
UserMangement -->
<UserManagement>
<settings>
<add key="UserName" value="calderara" />
<add key="PassWord" value="Tiphaine" />
<add key="RememberEntry" value="0" />
</settings>
</UserManagement>

<!-- Definition of the Configuration management assembly
setting
Parameter define in this section are only used by
UserMangement -->
<ConfigurationMangement>
<settings>
<add key="ConfigSaved" value="yes" />
<add key="AccessProviderDNS"
value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" />
</settings>

<database>
<add key="Path" value="E:\Configuration data
base" />
<add key="DNS"
value="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" />
<add key="sqlserver" value="true" />
</database>
</ConfigurationMangement>

<!-- Definition of the Language management assembly setting Parameter define in this section are only used by
UserMangement -->
<LanguageMangement>
<settings>
<add key="Default" value="English" />
</settings>
</LanguageMangement>

<!-- Definition of the HMI builder assembly setting
Parameter define in this section are only used by
UserMangement -->
<HMIBuilder>
<settings>
<add key="XPos" value="100" />
</settings>
</HMIBuilder>

</configuration>

Thnaks to help me how can I access my section group.
I have try to use the following to access them but no luck:
Dim nvc As NameValueCollection
nvc = CType(ConfigurationSettings.GetConfig
("UserManagement/settings"), NameValueCollection)

thanks agin for your help
regards

.

Jul 21 '05 #2

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

Similar topics

3
4836
by: Kris van der Mast | last post by:
Hi, I've created a little site for my sports club. In the root folder there are pages that are viewable by every anonymous user but at a certain subfolder my administration pages should be...
6
2033
by: Dean R. Henderson | last post by:
I have a DTS Package I am able to execute successfully from a Windows Form application, but I cannot get this to work from an ASP.NET Web Service, although the Web Service impersonates the same...
1
1196
by: sean | last post by:
Hi There, I have an asp .net application that I am trying to debug remotely, unfortunatley I do not have access to the server itself. I have verified the application is working on my local...
25
2818
by: n3crius | last post by:
hi, i just got a web host with asp.net , seemed really cool. aspx with the c# or vb IN the actual main page run fine, but when i use codebehind and make another source file ( a .cs) to go with...
3
2526
by: VB Programmer | last post by:
I am using the free rich text editor control from ExportTechnologies. Every once in a while I get this error (for no apparent reason). Sometimes it happens even when I'm working on a totally...
1
276
by: serge calderara | last post by:
dear all, I have problem accessing section group in my configuration application file. I got an error saying thta I can have only one section ???? here is my application configuration looks...
1
9584
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
1
3737
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I...
4
2201
by: Brad Isaacs | last post by:
I am working with ASP.NET 2.0 and using an SQL Server 2000 database. I am using Visual Studio 2005 and developing on my Local machine. I am working with Login controls ASP.Configuration, I...
0
7192
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,...
0
7261
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,...
0
7315
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...
1
6974
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...
0
7445
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...
0
5559
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4665
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1492
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 ...
0
369
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...

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.