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

Dec 10

Written by: Tim Wheeler
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>

Tags:

4 comments so far...

Re: Enterprise Library 4.1 October 2008

Hi, It's been a while since I used DAAB application block. I have a basic question. How does the DAAB dlls understand the config file? Can we have multiple config files? I am still having issues with the default database.

By Anu on   12/23/2008

Re: Enterprise Library 4.1 October 2008

http://www.picktorrent.com

By jghfh on   12/23/2009

Re: Enterprise Library 4.1 October 2008

Just want to thank you for the useful articles share here. Keep on writing this kind of stuff. I will be your frequent reader.


web cam roulette

By James on   4/6/2010

Re: Enterprise Library 4.1 October 2008


christian louboutin--louboutin--christian louboutin--louboutin shoes--christian louboutin boots--lv handbags--mbt shoes--christian louboutin--nike shoes--cheap nike shoes--discount nike shoes--nike shoes sale--Jimmy choo--Jimmy choo shoes--cheap Jimmy choo--discount Jimmy choo--Jimmy choo shoes sale--moncler women--cheap moncler women--discount moncler women--moncler women sale--Manolo Blahnik--Manolo Blahnik shoes--cheap Manolo Blahnik--discount Manolo Blahnik--Manolo Blahnik sale--moncler men--cheap moncler men--discount moncler men--moncler men sale--Balmain Shoes--cheap Balmain Shoes--discount Balmain Shoes--Balmain Shoes sale--moncler kids--cheap moncler kids--discount moncler kids--moncler kids sale--Yves saint Laurent--Yves saint Laurent shoes--cheap Yves saint Laurent--discount Yves saint Laurent--Yves saint Laurent sale--cheap mbt shoes--discount mbt shoes--mbt shoes sale--Ed Hardy--Ed Hardy shoes--cheap Ed Hardy--discount Ed Hardy--Ed Hardy sale--UGG boots--cheap UGG boots--discount UGG boots--UGG boots sale--Alexander McQueen--Alexander McQueen shoes--cheap Alexander McQueen--discount Alexander McQueen--Alexander McQueen sale--Chanel Shoes--cheap Chanel Shoes--discount Chanel Shoes--Chanel Shoes sale--Gucci Shoes--cheap Gucci Shoes--discount Gucci Shoes--Gucci Shoes sale--Tory Burch Shoes--Tory Burch--cheap Tory Burch Shoes--discount Tory Burch Shoes--Tory Burch Shoes sale--Lanvin Shoes--cheap Lanvin Shoes--Lanvin Shoes--Lanvin Shoes sale--Bottega Veneta--Bottega Veneta shoes--cheap Bottega Veneta--discount Bottega Veneta--Bottega Veneta sale--

By s on   4/8/2010

Your name:
Title:
Comment:
Security Code
Enter the code shown above in the box below
Add Comment    Cancel  
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