.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
MarieAdela
Imran Ghani
Post New Web Links

how can i use DatabaseFactory.CreateDatabase()?

Posted By:      Posted Date: September 09, 2010    Points: 0   Category :ASP.Net
 
how can i use this? Database _dbBase = DatabaseFactory.CreateDatabase();  when i use this code...im getting this error 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)  


View Complete Post


More Related Resource Links

cannot CreateDatabase

  

I have created webservice which calles DatabaseFactory.CreateDataase().

I have tested it locally and it works fine.

However, when I run webservice using client side application (console application) it throws me the following exception (it seems it cannot conntect to database or cannot find web.config settings defined in werbservice). What it is wrong? If I remove connection to database then webservice works fine.

It seems that when i call webservice from client site application then

ConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString is empty, and any other methods to get connection string shows null. 

 

{"Exception 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.\r\n   at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseConfigurationView.ValidateInstanceName(String name)\r\n   at Microsoft.Practices.EnterpriseLibrary.Data.DatabaseConfigurationView.GetConnectionStringSettings(String name)\r\n   at Micro

Categories: 
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend