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 73:                     MySqlCommand objCommandLand = new MySqlCommand("SELECT * FROM tbllanden WHERE culture='" + System.Threading.Thread.CurrentThread.CurrentCulture.Name + "' ", objConnection);
Line 74: 
Line 75:                     objDataReader = objCommandLand.ExecuteReader();
Line 76: 
Line 77:                     if (objDataReader.Read())

Source File: d:\www\hovingschilderwerken.nl\www\App_Code\Common.cs    Line: 75

Stack Trace:


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +13029779
   MySql.Data.MySqlClient.CharSetMap.GetCharacterSet(DBVersion version, String CharSetName) +23
   MySql.Data.MySqlClient.MySqlField.SetFieldEncoding() +200
   MySql.Data.MySqlClient.NativeDriver.GetColumnData(MySqlField field) +356
   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, Boolean force) +148
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +111
   MySql.Data.MySqlClient.MySqlDataReader.Close() +72
   MySql.Data.MySqlClient.MySqlCommand.ResetReader() +45
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1370
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6
   ictHoogeveen.Common.SetCulture(Object sessionObject) in d:\www\hovingschilderwerken.nl\www\App_Code\Common.cs:75
   template.InitializeCulture() in d:\www\hovingschilderwerken.nl\www\Template.aspx.cs:24
   ASP.template_aspx.__BuildControlTree(template_aspx __ctrl) in d:\www\hovingschilderwerken.nl\www\template.aspx:1
   ASP.template_aspx.FrameworkInitialize() in d:\www\hovingschilderwerken.nl\www\Template.aspx.cs:912308
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +48
   System.Web.UI.Page.ProcessRequest() +76
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +24
   System.Web.UI.Page.ProcessRequest(HttpContext context) +62
   ASP.template_aspx.ProcessRequest(HttpContext context) in d:\www\hovingschilderwerken.nl\tmp\root\d1984c4a\c94b45eb\App_Web_template.aspx.cdcab7d2.9jxhs5uw.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +195
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +73


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