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\delaeredakwerken.nl\www\App_Code\Common.cs    Line: 75

Stack Trace:


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.ThrowHelper.ThrowKeyNotFoundException() +28
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +7672444
   MySql.Data.MySqlClient.CharSetMap.GetCharacterSet(DBVersion version, String CharSetName) +23
   MySql.Data.MySqlClient.MySqlField.SetFieldEncoding() +198
   MySql.Data.MySqlClient.NativeDriver.GetColumnData(MySqlField field) +299
   MySql.Data.MySqlClient.NativeDriver.GetColumnsData(MySqlField[] columns) +29
   MySql.Data.MySqlClient.Driver.GetColumns(Int32 count) +144
   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) +146
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +115
   MySql.Data.MySqlClient.MySqlDataReader.Close() +72
   MySql.Data.MySqlClient.MySqlCommand.ResetReader() +42
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1256
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6
   ictHoogeveen.Common.SetCulture(Object sessionObject) in d:\www\delaeredakwerken.nl\www\App_Code\Common.cs:75
   template.InitializeCulture() in d:\www\delaeredakwerken.nl\www\Template.aspx.cs:23
   ASP.template_aspx.__BuildControlTree(template_aspx __ctrl) in d:\www\delaeredakwerken.nl\www\template.aspx:1
   ASP.template_aspx.FrameworkInitialize() in d:\www\delaeredakwerken.nl\www\Template.aspx.cs:912308
   System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +56
   System.Web.UI.Page.ProcessRequest() +80
   System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
   System.Web.UI.Page.ProcessRequest(HttpContext context) +49
   ASP.template_aspx.ProcessRequest(HttpContext context) in App_Web_template.aspx.cdcab7d2.tgra5mqf.0.cs:0
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75


Version Information: Microsoft .NET Framework Version:2.0.50727.9174; ASP.NET Version:2.0.50727.9175