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 32:         public DataSet GetBySetting(string _setting)
Line 33:         {
Line 34:             return ExecuteDataSet("Settings_GetBySetting",
Line 35:             Tools.getConnectionstring("default"),
Line 36:             CreateParameter("?_setting", MySqlDbType.VarChar, _setting));

Source File: d:\websites\dev.kinnemaskinteknik.com\content\App_Code\Settings\SettingsDataAccess.cs    Line: 34

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
   WPLibrary.DataAccess.ExecuteDataSet(MySqlCommand& cmd, String sqlQuery, String connectionString, IDataParameter[] sqlParam) +601
   WPLibrary.DataAccess.ExecuteDataSet(String sqlQuery, String connectionString, IDataParameter[] sqlParam) +60
   DataAccessLayer.SettingsDataAccess.GetBySetting(String _setting) in d:\websites\dev.kinnemaskinteknik.com\content\App_Code\Settings\SettingsDataAccess.cs:34
   Business.SettingsCollection.GetBySetting(String _Setting) in d:\websites\dev.kinnemaskinteknik.com\content\App_Code\Settings\SettingsCollectionBusiness.cs:17
   LanguageCookie.GetCookieName() in d:\websites\dev.kinnemaskinteknik.com\content\App_Code\LanguageCookie.cs:20
   LanguageCookie.GetCookieValue() in d:\websites\dev.kinnemaskinteknik.com\content\App_Code\LanguageCookie.cs:28
   Undersida.Page_PreInit(Object sender, EventArgs e) in d:\websites\dev.kinnemaskinteknik.com\content\Undersida.aspx.cs:12
   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