Server Error in '/' Application.

The given key was not present in the dictionary.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Source Error:


Line 74: 				if (da != null) da.Dispose();
Line 75: 				if (cmd != null) cmd.Dispose();
Line 76:                 conn.Dispose();
Line 77: 			}
Line 78: 

Source File: d:\websites\dev.seniorvillor.se\content\App_Code\DataAccess.cs    Line: 76

Stack Trace:


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +12974457
   MySql.Data.MySqlClient.CharSetMap.GetCharacterSet(DBVersion version, String CharSetName) +23
   MySql.Data.MySqlClient.MySqlField.SetFieldEncoding() +200
   MySql.Data.MySqlClient.MySqlField.SetTypeAndFlags(MySqlDbType type, ColumnFlags flags) +646
   MySql.Data.MySqlClient.NativeDriver.GetColumnData(MySqlField field) +557
   MySql.Data.MySqlClient.NativeDriver.GetColumnsData(MySqlField[] columns) +34
   MySql.Data.MySqlClient.Driver.GetColumns(Int32 count) +88
   MySql.Data.MySqlClient.ResultSet.LoadColumns(Int32 numCols) +22
   MySql.Data.MySqlClient.ResultSet..ctor(Driver d, Int32 statementId, Int32 numCols) +53
   MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId) +136
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +109
   MySql.Data.MySqlClient.MySqlDataReader.Close() +73
   MySql.Data.MySqlClient.MySqlConnection.Close() +59
   MySql.Data.MySqlClient.MySqlConnection.Dispose(Boolean disposing) +33
   System.ComponentModel.Component.Dispose() +21
   DataAccessLayer.DataAccess.ExecuteDataSet(MySqlCommand& cmd, String sqlQuery, IDataParameter[] sqlParam) in d:\websites\dev.seniorvillor.se\content\App_Code\DataAccess.cs:76
   DataAccessLayer.DataAccess.ExecuteDataSet(String sqlQuery, IDataParameter[] sqlParam) in d:\websites\dev.seniorvillor.se\content\App_Code\DataAccess.cs:31
   DataAccessLayer.PagesDataAccess.GetByUrl(String _url) in d:\websites\dev.seniorvillor.se\content\App_Code\Pages\PagesDataAccess.cs:45
   Business.PagesCollection.GetByUrl(String _url) in d:\websites\dev.seniorvillor.se\content\App_Code\Pages\PagesCollectionBusiness.cs:17
   Nyheter.Page_PreInit(Object sender, EventArgs e) in d:\websites\dev.seniorvillor.se\content\Nyheter.aspx.cs:15
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Page.OnPreInit(EventArgs e) +9885010
   System.Web.UI.Page.PerformPreInit() +37
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +296


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.4087.0