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 59: 				conn = new MySqlConnection(GetConnectionString());
Line 60: 				cmd.Connection = conn;
Line 61: 				conn.Open();
Line 62: 
Line 63: 				//Fyller datasetet

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

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
   DataAccessLayer.DataAccess.ExecuteDataSet(MySqlCommand& cmd, String sqlQuery, IDataParameter[] sqlParam) in d:\websites\dev.seniorvillor.se\content\App_Code\DataAccess.cs:61
   DataAccessLayer.DataAccess.ExecuteDataSet(String sqlQuery, IDataParameter[] sqlParam) in d:\websites\dev.seniorvillor.se\content\App_Code\DataAccess.cs:31
   DataAccessLayer.SlideshowDataAccess.GetImagesByAlbumID(String _albumID) in d:\websites\dev.seniorvillor.se\content\App_Code\Slideshow\SlideshowDataAccess.cs:88
   Business.SlideshowCollection.GetImagesByAlbumID(String _albumID) in d:\websites\dev.seniorvillor.se\content\App_Code\Slideshow\SlideshowCollectionBusiness.cs:29
   Modules_Slideshow_Slideshow.getData() in d:\websites\dev.seniorvillor.se\content\Modules\Slideshow\Slideshow.ascx.cs:33
   Modules_Slideshow_Slideshow.Page_Init(Object sender, EventArgs e) in d:\websites\dev.seniorvillor.se\content\Modules\Slideshow\Slideshow.ascx.cs:22
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnInit(EventArgs e) +95
   System.Web.UI.UserControl.OnInit(EventArgs e) +83
   System.Web.UI.Control.InitRecursive(Control namingContainer) +139
   System.Web.UI.Control.InitRecursive(Control namingContainer) +312
   System.Web.UI.Control.InitRecursive(Control namingContainer) +312
   System.Web.UI.Control.InitRecursive(Control namingContainer) +312
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +408


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