Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Invisible app.config databases node.
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
00907594
Message ID:
00908288
Views:
21
OK well this just seems to keep getting stranger...

Theoretically Victor, the extra stuff that was in the file you posted should only be necessary in order to easily switch databases. I actually had all that database set stuff in at one time but I removed it in order to simplify the xml and narrow down the field of possible problems. Having said that... Who knows.

I did some experimentation with the sample app as you suggested Kevin. Results were somewhat inconclusive... I tried running the sample app without any changes except the connection string (I don't have sql server installed locally). The data binding stuff that has been the problem worked fine that way. You will notice that even the connection string was the same and it worked fine although obviously it wasn't the correct tables or anything. The app.config was as follows:
<?xml version="1.0" encoding="Windows-1252"?>
<configuration>
  <configSections>
    <section name="databases" type="System.Configuration.NameValueSectionHandler" />
    <section name="databaseSets" type="System.Configuration.NameValueSectionHandler" />
  </configSections>
  <appSettings>
    <!--   User application and configured property settings go here.-->
    <!--   Example: <add key="settingName" value="settingValue"/> -->
    <add key="SecurityDatabaseSetKey" value="CustA" />
    <add key="SecurityDatabaseKey" value="Northwind" />
    <add key="DatabaseSetDefault" value="CustA" />
    <add key="EventLog\Level" value="Verbose" />
    <add key="EventLog\Machine" value="." />
    <add key="EventLog\Name" value="Application" />
    <add key="TraceLog\Level" value="Verbose" />
    <add key="TraceLog\Machine" value="." />
    <add key="TraceLog\Name" value="Application" />
    <add key="TransactionLog\Level" value="Verbose" />
    <add key="TransactionLog\Machine" value="." />
    <add key="TransactionLog\Name" value="Application" />
    <add key="LocalizeApp" value="false" />
    <add key="SecurityEnabled" value="false" />
  </appSettings>
  <databaseSets>
    <add key="CustA" value="Customer A (SQL Server)" />
    <add key="CustB" value="Customer B (Visual FoxPro)" />
  </databaseSets>
  <databases>
    <add key="CustA\Northwind\Connection" value="Data Source=Mercury;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ISPS;" />
    <add key="CustA\Northwind\DataAccessClass" value="DataAccessSql" />
    <add key="CustB\Northwind\Connection" value="Provider=vfpoledb.1;Data Source=C:\Program Files\Mere Mortals .NET Framework\Samples\VFPData\northwind.dbc" />
    <add key="CustB\Northwind\DataAccessClass" value="DataAccessOleDb" />
  </databases>
  <system.windows.forms jitDebugging="true" />
</configuration>
Ok so then I moved the exact same file to my app and just changed things to fit my app rather than the sample. I ended up with the exact same result as before:
"Error message: <databases> node not found in the configuration file."
The app.config was as follows:
<?xml version="1.0" encoding="Windows-1252"?>
<configuration>
  <configSections>
    <section name="databases" type="System.Configuration.NameValueSectionHandler" />
    <section name="databaseSets" type="System.Configuration.NameValueSectionHandler" />
  </configSections>
  <appSettings>
    <!--   User application and configured property settings go here.-->
    <!--   Example: <add key="settingName" value="settingValue"/> -->
    <add key="SecurityDatabaseSetKey" value="" />
    <add key="SecurityDatabaseKey" value="" />
    <add key="DatabaseSetDefault" value="TestData" />
    <add key="EventLog\Level" value="Verbose" />
    <add key="EventLog\Machine" value="." />
    <add key="EventLog\Name" value="Application" />
    <add key="TraceLog\Level" value="Verbose" />
    <add key="TraceLog\Machine" value="." />
    <add key="TraceLog\Name" value="Application" />
    <add key="TransactionLog\Level" value="Verbose" />
    <add key="TransactionLog\Machine" value="." />
    <add key="TransactionLog\Name" value="Application" />
    <add key="LocalizeApp" value="false" />
    <add key="SecurityEnabled" value="false" />
  </appSettings>
  <databaseSets>
    <add key="TestData" value="Test Data (Mercury)" />
    <add key="LiveData" value="Live Data (Saturn)" />
  </databaseSets>
  <databases>
    <add key="TestData\ISPS\Connection" value="Data Source=Mercury;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ISPS;" />
    <add key="TestData\ISPS\DataAccessClass" value="DataAccessSql" />
    <add key="LiveData\ISPS\Connection" value="Data Source=Saturn;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=ISPS;" />
    <add key="LiveData\ISPS\DataAccessClass" value="DataAccessSql" />
  </databases>
  <system.windows.forms jitDebugging="true" />
</configuration>
I tried filling the security database tags as well thinking that change may have made the difference. Nope.

So basically nothing I tried worked. I even tried just copying the sample config.app into my app with no changes just to see what would happen. Same result.

Kevin, what should I email you? Let me know and I shall do it forthwith. 8)
Tory Netherton
Software Developer
Omni Financial Services
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform