An item with the same key has already been added message aft

Posted by Community Admin on 04-Aug-2018 11:23

An item with the same key has already been added message after copying Sitefinity

All Replies

Posted by Community Admin on 08-Aug-2017 00:00

I want to copy our Sitefnity site for testing purposes ( We are using version 8 and want to migrate to the latest version ). Doy you have a solution for this problem? ( I have copied the site and used a backup from the SQL database )

Underneath the whole error message:

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) +14291916 Telerik.Sitefinity.Configuration.ConfigElementDictionary`2.Add(TKey key, TElement element) +194 Telerik.Sitefinity.Security.Configuration.SecurityConfig.LoadDefaults() +1956 Telerik.Sitefinity.Security.Configuration.SecurityConfig.OnPropertiesInitialized() +95 Telerik.Sitefinity.Configuration.ConfigSection.InitializeProperties() +27 Telerik.Sitefinity.Configuration.ConfigElement.EnsurePropertiesInitialized() +122 Telerik.Sitefinity.Configuration.ConfigElement.get_Properties() +21 Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadAttributes(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew) +199 Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadElement(ConfigElement element, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, UpgradingInfo upgradingInfo, Boolean isNew, Boolean validateTagName) +198 Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromReader(ConfigSection section, XmlReader reader, ConfigPolicyHandler policyHandler, String policyName, Boolean checkForUpgrade, UpgradingInfo& upgradingInfo) +240 Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSectionFromFile(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName, Boolean withUpgrade) +134 Telerik.Sitefinity.Configuration.Data.XmlConfigProvider.LoadSection(ConfigSection section, ConfigPolicyHandler policyHandler, String policyName) +72 Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider, ConfigPolicyHandler policyHandler, String policyName, Boolean singlePolicy) +301 Telerik.Sitefinity.Configuration.ConfigSection.Initialize(ConfigProvider provider) +28 Telerik.Sitefinity.Configuration.Config.GetSectionInternal(Type sectionType, Boolean safeMode, String sectionName) +168 Telerik.Sitefinity.Configuration.Config.GetSectionPrivate(Type sectionType, Boolean safeMode, String sectionName) +187 Telerik.Sitefinity.Configuration.Config.GetSectionPrivate(Boolean safeMode) +99 Telerik.Sitefinity.Security.SecurityManager..cctor() +339 [TypeInitializationException: The type initializer for 'Telerik.Sitefinity.Security.SecurityManager' threw an exception.] Telerik.Sitefinity.Security.SecurityManager.GetCurrentUserId() +0 Telerik.Sitefinity.Services.SitefinityContextBase.get_BackendCulture() +153 Telerik.Sitefinity.Localization.Resource.ResolveCulture(CultureInfo culture) +59 Telerik.Sitefinity.Localization.Resource.GetString(ResourceDataProvider provider, String classId, ResourceProperty property, CultureInfo culture, Boolean falback) +81 Telerik.Sitefinity.Modules.ControlTemplates.ControlTemplates.RegisterTemplatableControl(Type controlType, Type dataItemType, String resourceClassId, String areaName, String controlDisplayName) +162 Telerik.Sitefinity.Modules.ControlTemplates.ControlTemplates.RegisterTemplatableControl(Type controlType, Type dataItemType) +110 Telerik.Sitefinity.Services.SystemManager.Initialize() +1199 Telerik.Sitefinity.Abstractions.Bootstrapper.RegisterRoutes() +1020 Telerik.Sitefinity.Abstractions.Bootstrapper.Bootstrap() +573 Telerik.Sitefinity.Web.SitefinityHttpModule.Init(HttpApplication context) +334 System.Web.HttpApplication.InitModulesCommon() +207 System.Web.HttpApplication.InitInternal(HttpContext context, HttpApplicationState state, MethodInfo[] handlers) +977 System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +317 System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +418

This thread is closed