473,763 Members | 8,980 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" ?>
<configuratio n>
<!-- 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="LogFilePat h" 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.diagnos tics>
<switches>
<add name="Enabled" value="1" />
<add name="TraceSeve rity" value="1" />
</switches>
</system.diagnost ics>

<!-- 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="UserManag ement">
<section name="settings"

type="System.Co nfiguration.Nam eValueSectionHa ndler" />
</sectionGroup>

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

type="System.Co nfiguration.Sin gleTagSectionHa ndler" />
<section name="database"

</sectionGroup>

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

type="System.Co nfiguration.Sin gleTagSectionHa ndler" />
</sectionGroup>

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

type="System.Co nfiguration.Sin gleTagSectionHa ndler" />
</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="calderar a" />
<add key="PassWord" value="Tiphaine " />
<add key="RememberEn try" value="0" />
</settings>
</UserManagement>

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

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

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

<!-- 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 NameValueCollec tion
nvc = CType(Configura tionSettings.Ge tConfig
("UserManagemen t/settings"), NameValueCollec tion)

thanks agin for your help
regards

Jul 21 '05 #1
1 2769
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="LogFilePat h" 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.diagnos tics>
<switches>
<add name="Enabled" value="1" />
<add name="TraceSeve rity" value="1" />
</switches>
</system.diagnost ics>

<!-- 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="UserManag ement">
<section name="settings"

type="System.C onfiguration.Na meValueSectionH andler" />
</sectionGroup>

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

type="System.C onfiguration.Si ngleTagSectionH andler" />
<section name="database"

</sectionGroup>

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

<sectionGroup name="LanguageM anagement">
<section name="settings"

type="System.C onfiguration.Si ngleTagSectionH andler" />
</sectionGroup>

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

type="System.C onfiguration.Si ngleTagSectionH andler" />
</sectionGroup>

</configSections>
<!-- Definition of the User management assembly setting
Parameter define in this section are only used by
UserMangemen t -->
<UserManagement >
<settings>
<add key="UserName" value="calderar a" />
<add key="PassWord" value="Tiphaine " />
<add key="RememberEn try" value="0" />
</settings>
</UserManagement>

<!-- Definition of the Configuration management assembly
setting
Parameter define in this section are only used by
UserMangemen t -->
<ConfigurationM angement>
<settings>
<add key="ConfigSave d" value="yes" />
<add key="AccessProv iderDNS"
value="Provide r=Microsoft.Jet .OLEDB.4.0;Data Source=" />
</settings>

<database>
<add key="Path" value="E:\Confi guration data
base" />
<add key="DNS"
value="Provide r=Microsoft.Jet .OLEDB.4.0;Data Source=" />
<add key="sqlserver" value="true" />
</database>
</ConfigurationMa ngement>

<!-- Definition of the Language management assembly setting Parameter define in this section are only used by
UserMangemen t -->
<LanguageMangem ent>
<settings>
<add key="Default" value="English" />
</settings>
</LanguageMangeme nt>

<!-- Definition of the HMI builder assembly setting
Parameter define in this section are only used by
UserMangemen t -->
<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 NameValueCollec tion
nvc = CType(Configura tionSettings.Ge tConfig
("UserManageme nt/settings"), NameValueCollec tion)

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
4870
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 protected by forms authentication. When I create forms authentication at root level it works but when I move my code up to the subfolder I get this error: Server Error in '/TestProjects/FormsAuthenticationTestingArea' Application.
6
2049
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 user the Windows Form runs under. When I run the Web Service, I make a call to "System.Security.Principal.WindowsIdentity.GetCurrent().Name" and this verifies the user-id is the same account I am logged onto when I successfully run my Windows...
1
1222
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 machine but on the remote server it is not. The application inserts rows into an ms access DB, do I need to give the aspnet worker process explicit access to the ms access database? and how can I make the server return error messages, the one below...
25
2861
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 the aspx (as you would realistically) I get this : Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file located in the root...
3
2551
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 non-related page! To fix it I strip out ALL references to the editor the redo the references and it sometimes works. Any ideas? Here's the full error: Server Error in '/MyWebApp' Application. ________________________________________
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 like: ================================================ <?xml version="1.0" encoding="utf-8" ?>
1
9651
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 and I was wondering if anyone here would be able to give me some tips for young players such as myself, for learning the language. Is this the best Newsgroup for support with JAVA?
1
3758
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 wanted to move my work and needed to place it on the server. Using VS 2005 , went to BUILD -Publish Web Site Checked the box for :: Alow this precompiled site to be updatable.
4
2215
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 wanted to move my work and needed to place it on the server. Using VS 2005 , went to BUILD -Publish Web Site Checked the box for :: Alow this precompiled site to be updatable.
0
9387
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,...
1
9938
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
9823
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
8822
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6643
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
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
2
3528
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2794
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.