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) +38
   MySql.Data.MySqlClient.CharSetMap.GetEncoding(DBVersion version, String CharSetName) +59
   MySql.Data.MySqlClient.Driver.Configure(MySqlConnection connection) +729
   MySql.Data.MySqlClient.MySqlConnection.Open() +464
   WPLibrary.DataAccess.ExecuteDataSet(MySqlCommand& cmd, String sqlQuery, String connectionString, IDataParameter[] sqlParam) +420
   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