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:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

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) +46
   MySql.Data.MySqlClient.MySqlField.SetFieldEncoding() +122
   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() +387
   MySql.Data.MySqlClient.MySqlDataReader.Close() +133
   MySql.Data.MySqlClient.MySqlCommand.ResetReader() +45
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1695
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +6
   MySql.Data.MySqlClient.ISSchemaProvider.GetTable(String sql) +86
   MySql.Data.MySqlClient.ISSchemaProvider.Query(String table_name, String initial_where, String[] keys, String[] values) +176
   MySql.Data.MySqlClient.ISSchemaProvider.GetProcedures(String[] restrictions) +209
   MySql.Data.MySqlClient.ISSchemaProvider.GetSchemaInternal(String collection, String[] restrictions) +168
   MySql.Data.MySqlClient.SchemaProvider.GetSchema(String collection, String[] restrictions) +71
   MySql.Data.MySqlClient.MySqlConnection.GetSchemaCollection(String collectionName, String[] restrictionValues) +58
   MySql.Data.MySqlClient.ProcedureCache.GetProcData(MySqlConnection connection, String spName) +192
   MySql.Data.MySqlClient.ProcedureCache.AddNew(MySqlConnection connection, String spName) +39
   MySql.Data.MySqlClient.ProcedureCache.GetProcedure(MySqlConnection conn, String spName, String cacheKey) +172
   MySql.Data.MySqlClient.StoredProcedure.GetParameters(String procName) +70
   MySql.Data.MySqlClient.StoredProcedure.CheckParameters(String spName) +73
   MySql.Data.MySqlClient.StoredProcedure.Resolve(Boolean preparing) +301
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +893
   MySql.Data.Entity.EFMySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +33
   System.Data.Common.DbCommand.ExecuteReader(CommandBehavior behavior) +12
   System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +450

[EntityCommandExecutionException: An error occurred while executing the command definition. See the inner exception for details.]
   System.Data.EntityClient.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior) +519
   System.Data.EntityClient.EntityCommandDefinition.Execute(EntityCommand entityCommand, CommandBehavior behavior) +54
   System.Data.EntityClient.EntityCommand.ExecuteReader(CommandBehavior behavior) +46
   System.Data.EntityClient.EntityCommand.ExecuteScalar(Func`2 resultSelector) +36
   System.Data.EntityClient.EntityCommand.ExecuteNonQuery() +119
   System.Data.Objects.ObjectContext.ExecuteFunction(String functionName, ObjectParameter[] parameters) +235
   jagtformidling.dk.Model.Entities.sp_DeleteExpiredAds() +95
   jagtformidling.dk.Code.AdCategory.UpdateDatebase() +201
   jagtformidling.dk.Global.Session_Start(Object sender, EventArgs e) +173
   System.Web.SessionState.SessionStateModule.RaiseOnStart(EventArgs e) +10082212
   System.Web.SessionState.SessionStateModule.CompleteAcquireState() +165
   System.Web.SessionState.SessionStateModule.BeginAcquireState(Object source, EventArgs e, AsyncCallback cb, Object extraData) +1126
   System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +297
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163


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