472,779 Members | 1,865 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,779 software developers and data experts.

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 2686
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
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
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
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
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
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
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
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
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
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
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

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.