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 25:         Dim da As New MySqlDataAdapter(cmd)
Line 26: 
Line 27:         da.Fill(ds)
Line 28:         GridView1.DataSource = ds
Line 29:         GridView1.DataBind()

Source File: C:\Inetpub\vhosts\shrishirdisaibabasansthan.com\httpdocs\MasterPage.master.vb    Line: 27

Stack Trace:


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +12780433
   MySql.Data.MySqlClient.CharSetMap.GetCharacterSet(DBVersion version, String CharSetName) +23
   MySql.Data.MySqlClient.NativeDriver.GetFieldMetaData41() +672
   MySql.Data.MySqlClient.NativeDriver.GetFieldMetaData() +56
   MySql.Data.MySqlClient.NativeDriver.ReadColumnMetadata(Int32 count) +39
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +272
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +815
   MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +12
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +139
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +136
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +88
   MasterPage.News_Bind() in C:\Inetpub\vhosts\shrishirdisaibabasansthan.com\httpdocs\MasterPage.master.vb:27
   MasterPage.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\shrishirdisaibabasansthan.com\httpdocs\MasterPage.master.vb:14
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Control.LoadRecursive() +131
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


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