locked
Invalid section name. The section 'dataConfiguration' does not exist in the requested configuration RRS feed

  • Question

  • User1130929685 posted

    I've seen some similiar posts, but can't find a clear solution.
    http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=6910
    http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=12688

    In my 2005 solution, I have a ClassLibrary Project for JobManager.DAL and Class Library Project for MyRep.
    In the MyRep project, my App.Config looks like:
    <configuration>
    <configSections>
    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />
    </configSections>
    <dataConfiguration defaultDatabase="QuickStarts Instance" />
    <connectionStrings>
    <add name="QuickStarts Instance" connectionString="Database=EntLibQuickStarts;Server=blah\DEFAULT2005;user=sa;password=password;"

    providerName="System.Data.SqlClient" />
    </connectionStrings>
    </configuration>

    In my DAL, I have a method simply that I keep getting the below error:
    Database myDatabase = DatabaseFactory.CreateDatabase("QuickStarts Instance");

    Invalid section name. The section 'dataConfiguration' does not exist in the requested configuration file 'C:\\Projects\\JobManager2\\MyRep\\bin\\Debug\\MyRep.vshost.exe.config' or the file 'C:\\WINNT\\Microsoft.NET\\Framework\\v2.0.50727\\Config\\machine.config'. Make sure that the 'enterpriseLibrary.configurationSections' configuration section exists in one of the files and that the section 'dataConfiguration' is defined.

    What am I doing wrong? I've been fighting with this one. Do I need to do anything special considering the DAL is in a seperate project?

    Monday, February 18, 2008 8:21 PM

All replies

  • User-863835478 posted

    Did you finally found your solution? I am experiencing a similar problem.

    How do you know and fill in the version part below:

    <section name="dataConfiguration" type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null" />

    Thanks.

     

    Thursday, April 22, 2010 12:07 AM