Urgent: An item with the same key has already been added

For general questions and discussions specific to the AbleCommerce 7.0 Asp.Net product.
Post Reply
jhollender
Ensign (ENS)
Ensign (ENS)
Posts: 20
Joined: Wed Apr 02, 2014 2:52 pm

Urgent: An item with the same key has already been added

Post by jhollender » Tue Jan 26, 2016 11:12 am

I really need some help. Our site just started randomly getting some errors over the previous weekend. The error is being generated from random pages on the site, and of course, there is hardly any information to go on.
Here's the error:

Code: Select all

System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
   at System.Collections.ObjectModel.KeyedCollection`2.AddKey(TKey key, TItem item)
   at System.Collections.ObjectModel.KeyedCollection`2.InsertItem(Int32 index, TItem item)
   at System.Collections.ObjectModel.Collection`1.Add(T item)
   at CommerceBuilder.Catalog.DefaultUrlRewriter.InitializeCache()
   at CommerceBuilder.Catalog.DefaultUrlRewriter.a(String A_0)
   at CommerceBuilder.Catalog.DefaultUrlRewriter.RewriteUrl(String sourceUrl)
   at CommerceBuilder.Services.b.c(Object A_0, EventArgs A_1)
   at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
I don't even know where to start trying to fix this. I found this topic dealing with the same issue: viewtopic.php?f=42&t=16166 but there is no fix. We are not able to update to AC Gold, so that is not a solution for us. Please help!

User avatar
Katie
AbleCommerce Admin
AbleCommerce Admin
Posts: 2651
Joined: Tue Dec 02, 2003 1:54 am
Contact:

Re: Urgent: An item with the same key has already been added

Post by Katie » Thu Jan 28, 2016 1:45 pm

The only thing I can recommend (if upgrading is not an option) is to make sure that you have any hot patches or service release updates applied to your install. You didn't let us know which version you are using, so I can't check. Go to help.ablecommerce.com and click on AbleCommerce 7 in the left-column for all the old documentation.

Also, if this just started happening, and you haven't changed anything, then I would suspect maintenance. AC7 has had some issues surrounding the maintenance scripts but all that was solved when applying the latest patches.
Thank you for choosing AbleCommerce!

http://help.ablecommerce.com - product support
http://wiki.ablecommerce.com - developer support

Post Reply