Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ent Lib Unhandled Exception -new to C#

Status
Not open for further replies.

KCWMS

MIS
Mar 25, 2004
38
US
...using EntLib Jun 2005, VS 2003

I am new to c# and dotnet (3 weeks and learning like a fast) and am receiving this error while using the Enterprise Library Data Access Block at this line of code.

Code:
Database db = DatabaseFactory.CreateDatabase("SomeDB");

Code:
An unhandled exception of type 'System.Configuration.ConfigurationException' occurred in microsoft.practices.enterpriselibrary.configuration.dll

Additional information: An error occurred when creating the specified type 'Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'.

I have checked dataconfiguration.config, manually and with Ent Lib Config Console, and have all needed nodes.
Code:
<instance name="SomeDB" type="Sql Server" connectionString="constring" />

How do I track this problem down. I have other projects in the same solution using this exact line and they all connect fine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top