An item with the same key has already been added

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
Hi,

Occasionaly my 1.80 nopCommerce site is generating the exception below.

Any idea what might be causing this?


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) +52
   System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +9382923
   System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) +11
   NopSolutions.NopCommerce.BusinessLogic.SEO.SEOHelper.InitializeSeoCharacterTable() +199
   NopSolutions.NopCommerce.BusinessLogic.SEO.SEOHelper.GetSEName(String name) +217
   NopSolutions.NopCommerce.BusinessLogic.SEO.SEOHelper.GetProductUrl(Product product) +199
   NopSolutions.NopCommerce.Web.Modules.ProductCategoryBreadcrumb.BindData() +116
   NopSolutions.NopCommerce.Web.Modules.ProductCategoryBreadcrumb.Page_Load(Object sender, EventArgs e) +82
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Control.LoadRecursive() +146
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207

________________________________________
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
13 years ago
It's a bug that appears when several users are trying to access a site for the first time (all ASP.NET sites has some delay when they're requested for the first time). It's already fixed and will be available in the next release. If you don't want to wait, then you can find a patch here
13 years ago
Thanks for the quick reply Andrei!
13 years ago
I'm having the issue with the same error.  I updated the files, re-built and I still get it.  Oddly enough everything works fine when I test it locally however when I go to publish it to the server everything goes south.  Anyway is there anything else that could cause this issue?
12 years ago
I have the same issue and still cant solve it in Nopcommerce 1.80. The link with the possible patch to solve it is broken. Could someone show me where I can find the solution please??
12 years ago
Solution: Upgrade to 1.90
12 years ago
I touhgt of doing that but I did a lot of modifications in the code so I dont know if its a good idea. Is there any patch just to correct this issue??
12 years ago
Does anyone have a solution for this, for 1.8? i cant upgrade, have way to many modifications.
12 years ago
The solution exist, not officaly version of urlrewriting you can find here.

I have tested only locally but seem's to me it's work

http://groups.google.com/group/UrlRewritingNet/browse_thread/thread/8496104ea1e1d676

http://urlrewritingnet.googlecode.com/svn/branches/v2/UrlRewriter/

Just change the code and everything else in urlrewriting.net in nopcommerce from the link above

I hope this will also help to somebody.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.