Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • shashidhar 5 posts 75 karma points
    Jan 11, 2023 @ 04:56
    shashidhar
    0

    An item with the same key has already been added. Key: 1056

    Hi

    I am developing new application by using Umbraco version 10.3.1. I am getting below exception.

    I have generated script to back up Database from existing Database. I connected to new database and ran the application then I got this exception. And connected back to old Database then it is also not working. same exception.

    ArgumentException: An item with the same key has already been added. Key: 1056
    System.Collections.Generic.Dictionary<TKey, TValue>.TryInsert(TKey key, TValue value, InsertionBehavior behavior)
    System.Linq.Enumerable.ToDictionary<TSource, TKey>(List<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer)
    Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.MapHistoryCleanup(Dictionary<int, IContentTypeComposition> contentTypes)
    Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.GetAllTypesInternal()
    Umbraco.Extensions.AppCacheExtensions+<>c__DisplayClass0_0<T>.<GetCacheItem>b__0()
    Umbraco.Cms.Core.Cache.SafeLazy+<>c__DisplayClass1_0.<GetSafeLazy>b__0()
    Umbraco.Cms.Core.Cache.ObjectCacheAppCache.Get(string key, Func<object> factory, Nullable<TimeSpan> timeout, bool isSliding, string[] dependentFiles)...
    SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, bool retry)
    StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in MiniProfilerMiddleware.cs
    Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
    Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next)
    

    Thanks,

  • Huw Reddick 1932 posts 6722 karma points MVP 3x c-trib
    Jan 11, 2023 @ 08:04
    Huw Reddick
    1

    When are you getting the error?

  • shashidhar 5 posts 75 karma points
    Jan 11, 2023 @ 09:58
    shashidhar
    0

    Hi,

    I have generated script to back up Database from existing Database. I connected to new database and ran the application then I got this exception. And connected back to old Database then it is also not working.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies