Server Error in '/' Application.

An item with the same key has already been added.

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.ArgumentException: An item with the same key has already been added.

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:


[ArgumentException: An item with the same key has already been added.]
   System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +60
   System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +14338200
   System.Data.Entity.Core.Objects.ObjectStateManager.AddEntityEntryToDictionary(EntityEntry entry, EntityState state) +343
   System.Data.Entity.Core.Objects.ObjectStateManager.AddEntry(IEntityWrapper wrappedObject, EntityKey passedKey, EntitySet entitySet, String argumentName, Boolean isAdded) +859
   System.Data.Entity.Core.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly(Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet) +362
   lambda_method(Closure , Shaper ) +356
   System.Data.Entity.Core.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper) +389
   System.Data.Entity.Core.Common.Internal.Materialization.SimpleEnumerator.MoveNext() +88
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +526
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +69
   BL.Blm.GetMostLike() in C:\Users\PC\Source\Repos\AsanBTC2\BL\Blm.cs:798
   AsanBTC.Contents.GetMostLike() in C:\Users\PC\Source\Repos\AsanBTC2\AsanBTC\Contents.aspx.cs:695
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +154
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4082


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