Upgrade 8.1 -> 8.2: An item with the same key has already been added.

Kentico IT Support PPG asked on February 1, 2017 15:41

Currently in the process of upgrading a project from 8.1 -> 8.2. Each time, I run through the upgrade with no issue, but receive an error when debugging the site. I have tried this with two different sites and have gotten the same result.

Has anyone seen this one before and what do you believe that the problem could be?

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

Image Text

Recent Answers


Chetan Sharma answered on February 1, 2017 18:58

Check your web.config there might be some duplicate keys causing this.

0 votesVote for this answer Mark as a Correct answer

Kentico IT Support PPG answered on February 1, 2017 21:15

Doesn't look like that is the issue here. I compared the web.config to pre-upgrade and the only difference was the addition of this under assemblies:

<add assembly="WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
<add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add assembly="System.Net.Http, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
0 votesVote for this answer Mark as a Correct answer

Michal Samuhel answered on February 2, 2017 10:05

Have you tried clearing the cache as well as temporary .NET files?

The error is coming from module entry manager class, which is registering all modules in application. Either it is trying to load collection data from the cache.

Otherwise were you using any custom modules on v8.1? It might be possible that there is a conflict of names between some modules, or there is a custom code that is trying to register same module multiple times.

0 votesVote for this answer Mark as a Correct answer

Kentico IT Support PPG answered on February 2, 2017 15:23

I have tried clearing the cache and deleting Temp.NET files. Still getting the error.

Any idea how to trap the duplicate to see where the Module error is coming from?

0 votesVote for this answer Mark as a Correct answer

Chetan Sharma answered on February 2, 2017 16:44

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.