Manish Pansiniya's Blog

.NET, C#, Javascript, ASP.NET and lots more…:)

Posts Tagged ‘database

Microsoft.Practices.ServiceLocation.ActivationException–EnterpriseLibrary The type Database cannot be constructed

with 15 comments

While moving code first time to live server, we started to get following error. I found that the issue in my case is, I do not put providerName="System.Data.SqlClient"  in following connection string.

    <add name="XYZ" connectionString="Data Source=localhost;Initial Catalog=LondonDreams;Persist Security Info=True;User ID=dream;Password=dream" providerName="System.Data.SqlClient"/>

Once I put that in above part, it worked fine for below error.

Microsoft.Practices.ServiceLocation.ActivationException: Activation error occured while trying to get instance of type Database, key "XYZ"
—> Microsoft.Practices.Unity.ResolutionFailedException: Resolution of
—> the dependency failed, type =
"Microsoft.Practices.EnterpriseLibrary.Data.Database", name = "XYZ".
Exception occurred while: while resolving.
Exception is: InvalidOperationException – The type Database cannot be constructed. You must configure the container to supply this value.
———————————————–
At the time of the exception, the container was:
Resolving
Microsoft.Practices.EnterpriseLibrary.Data.Database,XYZ
—> System.InvalidOperationException: The type Database cannot be constructed. You must configure the container to supply this value.

Smile

Advertisements

Written by Manish

November 12, 2010 at 10:49 am

Countries/States/City list for development

with 2 comments

I have just needed the countries/states/city list for the development purpose. After searching a bit, I found 2 good sites for the same.

http://download.geonames.org/export/dump/

Another is for many used lists

http://www.toolsjar.com/list_generator.php

Written by Manish

September 19, 2010 at 12:46 pm