Configuration Managament Application Block and Web.Config Problem

  • Thread starter Johannes H?drich
  • Start date
J

Johannes H?drich

Hello folks,

i've got a tough problem with configuration the CMAB in my asp.net
application. Following scenario is given:

root directory (ASP.NET Application)
|- web.config (access from CMAB works fine)
|- /VirDir1 (NO ASP.NET Application (just a normal VirtDir))
|- web.config (no access from CMAB possible)
|- execute.aspx (aspx page, which uses CMAB Config)

1. Design of the application makes it impossible to simply create an
app in IIS config for VirDir1

2. execute.aspx uses the CMAB to read a DatabaseIdentifierString from
VirDir1/execute.aspx

3. CMAB loads web.config through first time through
configurationSettings.GetConfig and gets /VirDir1/web.config for
reading the existing config sections

4. CMAB now wants to load the desired config section. But this time,
CMAB do not use configurationSettings.GetConfig, but
AppDomain.CurrentDomain.SetupInformation.ConfigurationFile .

==> at this point AppDomain.(...) points to /root/web.config NOT
/root/VirDir1/web.config.
/root/VirDir1/web.config does not have any CMAB Configuration
Sections.

The resulting error is:


Section 'DatabaseIdentifier' not defined on the configuration file.
Check the /configuration/configSections/section node in the
application config file (assemblyfilename.config). This node must be
like <section name="XmlConfig"
type="WinApp.CustomSectionHandler,WinApp" />.


Anybody there with a hint for troubleshooting? Fixing the CMAB would
be an option, but is not really preferred :)

Thanks in advance!
Greetings
Johannes
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,353
Latest member
RogerDoger

Latest Threads

Top