Aug 17, 2010 at 7:25 PM
Edited Aug 17, 2010 at 7:36 PM
I m trying to use the Database module of Entrprise library for my web application in VS2010. I have a web application in which i have some web service. in that applications web.config i have added the configuration as shown below.
type="Microsoft.Practices.EnterpriseLibrary.Data.Configuration.DatabaseSettings, Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0,
i wrote the following code in a DLL which is refered in the web application.
SqlDB = EnterpriseLibraryContainer.Current.GetInstance<Database>("Constr");
when executing the code it throws the following error.
Activation error occured while trying to get instance of type Database, key "Constr"
whats the mistake i m doing i couldnt figure it out. pls help me.