You are here: Blog Zone
 Register    Login 
Blogging .Net Minimize  

By Tim Wheeler on 12/10/2008

I got this error while trying to call the "CreateDatabase()" method on the DataFactory:

Initialization method MyClass threw exception. Microsoft.Practices.ObjectBuilder2.BuildFailedException:  Microsoft.Practices.ObjectBuilder2.BuildFailedException: The current build operation (build key Build Key[Microsoft.Practices.EnterpriseLibrary.Data.Database, null]) failed: The value can not be null or an empty string. (Strategy type ConfiguredObjectStrategy, index 2) --->  System.ArgumentException: The value can not be null or an empty string..

Found the answer here: http://www.codeplex.com/entlib/Thread/View.aspx?ThreadId=31848

It seems that the new library requires an extra setting in your config if you don't specify the connection name.

Add the dataconfiguration element above your connection strings:

 

<dataConfiguration defaultDatabase="default" />connectionStrings><add name="default" connectionString="Database=ABC;Server=Server;Integrated Security=SSPI" providerName="System.Data.SqlClient"

/>connectionStrings>

Search Minimize  

Code Artist.net v1.0 Minimize 

Code Artist.net released!  

With a simple to use interface your .net web sites will be showing professional looking source code in minutes.

Your Code, Your Format - Code Artist presents code like it’s meant to be seen.

More...


DotNetNuke Hosting Minimize  

Need professional DotNetNuke hosting from as little as $10 per month?  Contact Us for all your DotNetNuke needs with a package to suit everyone.  Our services include:

  • Free Base Setup
  • Free Premium Modules and Skins
  • Offsite Backup
  • High Availability > 99.5%
  • SSL Certificates
  • Business Portals from $500
  • Professional Help and Support

Enquire here about DotNetNuke Hosting.


 Copyright 2008 PureCoding.net
 Terms Of Use     Privacy Statement