I just downloaded the EntLib5.0 and tried to test this block for the first time. After doing some needed stuff and ready to fire up for the first time, I got this error:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error
details below and modify your configuration file appropriately.
Parser Error Message:
An error occurred creating the configuration section handler for dataConfiguration: Could not load file or assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I look into line #8 in the web.config and it points to:
Microsoft.Practices.EnterpriseLibrary.Data, Version=5.0.414.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Am I missing something? Here is my environment settings:
Tool: VS2010, running web-based app (using .NET framework 3.5 instead of 4.0)
SQL server 2005. The sql part works fine (with all corrected connection settings)
in my sample code_behind page, I have this super simple codes:
protected void Page_Load(object sender, EventArgs e)
Database db = DatabaseFactory.CreateDatabase();
String sqlCommand = "sp_Testing";
DbCommand dbCommand = db.GetStoredProcCommand(sqlCommand);
DataSet ds = new DataSet();
GV1.DataSource = db.ExecuteDataSet(dbCommand);
Please do help.
Are you referencing the Data assembly from GAC? If yes, there's an issue with that and it's described
here. The workaround is included as well.
Global Technology & Solutions