I am using the "Microsoft.Practices.EnterpriseLibrary.Data" version "5.0.414.0". I am using VS 2010.
I have added connectionstring entry in the web.config, and I am able to access the database using SQL Server 2008 R2.
I have added the below line in my code to use the database:
public class A1
public DataSet GetTableData()
Database db = null;
db = DatabaseFactory.CreateDatabase("Connection String Name");
However, I am getting an error as:
"Activation error occured while trying to get instance of type Database, key". It breaks in CreateDatabase line.
How to fix this?
View Complete Post