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 52:         d.CommandText = "SELECT ID,  KategoriAdi FROM Kategoriler where ID like '" & kid & "' "
Line 53:         Dim dr As MySqlDataReader
Line 54:         dr = d.ExecuteReader
Line 55:         Dim str As String = ""
Line 56:         Do While dr.Read()

Source File: D:\vhosts\tvolaf.org.tr\mersin.tvolaf.org.tr\App_Code\commFunctions.vb    Line: 54

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.GetChararcterSet(DBVersion version, String CharSetName) +23
   MySql.Data.MySqlClient.NativeDriver.GetFieldMetaData41() +581
   MySql.Data.MySqlClient.NativeDriver.GetFieldMetaData() +39
   MySql.Data.MySqlClient.NativeDriver.ReadColumnMetadata(Int32 count) +39
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +272
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +675
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6
   commFunctions.katAdi(String kid) in D:\vhosts\tvolaf.org.tr\mersin.tvolaf.org.tr\App_Code\commFunctions.vb:54
   _Default.icerik() in D:\vhosts\tvolaf.org.tr\mersin.tvolaf.org.tr\kategoriler.aspx.vb:16
   _Default._Default_Init(Object sender, EventArgs e) in D:\vhosts\tvolaf.org.tr\mersin.tvolaf.org.tr\kategoriler.aspx.vb:77
   System.Web.UI.Control.OnInit(EventArgs e) +97
   System.Web.UI.Page.OnInit(EventArgs e) +14
   System.Web.UI.Control.InitRecursive(Control namingContainer) +142
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +416


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