Home DotNet Unrecognized configuration section dataConfiguration
Author:

After creating a new project and you attempt to establish a connection to the database you encounter this error "Unrecognized configuration section dataConfiguration".

<add name="Production" connectionString="Database=AdventureWorks;Server=testserver;User Id=devuser; Password=devuser;" providerName="System.Data.SqlClient"/>
Line 27: </connectionStrings>
Line 28: <dataConfiguration defaultDatabase="Production"/>
Line 29: <system.web>
Line 30: <!--

You are getting this error because you either havent created the dataConfiguration section or you have note place it in the right place in the web.config file.

Solutions:

First create a configSections:

<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>

Then insert this code inside the tag <configuration>

 <dataConfiguration defaultDatabase="Production"/>

 



Comments (0)
Write comment
Your Contact Details:
Comment:
Security
Please input the anti-spam code that you can read in the image.

"