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) +56
   System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +13143720
   System.Data.Objects.ObjectStateManager.AddStateManagerTypeMetadata(EntitySet entitySet, ObjectTypeMapping mapping) +93
   System.Data.Objects.ObjectStateManager.GetOrAddStateManagerTypeMetadata(Type entityType, EntitySet entitySet) +144
   System.Data.Objects.ObjectStateManager.AddEntry(IEntityWrapper wrappedObject, EntityKey passedKey, EntitySet entitySet, String argumentName, Boolean isAdded) +39
   System.Data.Common.Internal.Materialization.Shaper.HandleEntityAppendOnly(Func`2 constructEntityDelegate, EntityKey entityKey, EntitySet entitySet) +226
   lambda_method(Closure , Shaper ) +199
   System.Data.Common.Internal.Materialization.Coordinator`1.ReadNextElement(Shaper shaper) +170
   System.Data.Common.Internal.Materialization.SimpleEnumerator.MoveNext() +99
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +186
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +61
   StrYazilim.BusinessLayer.ParametreManager.GetTumParametreler() in D:\Projeler\StrYazilim.OptikAkademi.Web.Solution\StrYazilim.BusinessLayer\ParametreManager.cs:18
   StrYazilim.BusinessLayer.ParametreManager.GetParametreler() in D:\Projeler\StrYazilim.OptikAkademi.Web.Solution\StrYazilim.BusinessLayer\ParametreManager.cs:28
   StrYazilim.BusinessLayer.ParametreManager.ParametreGetir(String parametreAdi) in D:\Projeler\StrYazilim.OptikAkademi.Web.Solution\StrYazilim.BusinessLayer\ParametreManager.cs:33
   StrYazilim.WebSite.Site.OnInit(EventArgs e) in D:\Projeler\StrYazilim.OptikAkademi.Web.Solution\StrYazilim.WebSite\Site.Master.cs:16
   System.Web.UI.Control.InitRecursive(Control namingContainer) +142
   System.Web.UI.Control.InitRecursive(Control namingContainer) +318
   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