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