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 172:        }
Line 173:
Line 174:        return cmd.ExecuteReader();
Line 175:    }
Line 176:

Source File: d:\s008013\gustavinnovation.se\WWWRoot\App_Code\DataService.cs    Line: 174

Stack Trace:


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +12774847
   MySql.Data.MySqlClient.MySqlField.SetFieldEncoding() +77
   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) +60
   MySql.Data.MySqlClient.Driver.NextResult(Int32 statementId, Boolean force) +158
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +426
   MySql.Data.MySqlClient.MySqlDataReader.Close() +138
   MySql.Data.MySqlClient.MySqlCommand.ResetReader() +48
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1679
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6
   DataService.executeReader(String cmdText) in d:\s008013\gustavinnovation.se\WWWRoot\App_Code\DataService.cs:174
   ProductLink.getProductLinks(Int32 pid) in d:\s008013\gustavinnovation.se\WWWRoot\App_Code\ProductLink.cs:61
   Product.getProduct(Int32 id) in d:\s008013\gustavinnovation.se\WWWRoot\App_Code\Product.cs:277
   ProductInfo.Page_Load(Object sender, EventArgs e) in d:\s008013\gustavinnovation.se\WWWRoot\ProductInfo.aspx.cs:34
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


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