Explore our articles to find helpful tips on website design, internet marketing and more.

DotNetNuke: An entry with the same key already exists – Error

by | Sep 13, 2023 | Attorney Marketing, Internet Marketing, Web Design

If you receive the following error:

DotNetNuke.Services.Exceptions.ModuleLoadException: An entry with the same key already
exists. —> System.ArgumentException: An entry with the same key already exists.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.SortedList`2.Add(TKey
key, TValue value) at DotNetNuke.Entities.Modules.DesktopModuleController.GetPortalDesktopModules(Int32
portalID) at DotNetNuke.UI.ControlPanels.IconBar.BindData() at DotNetNuke.UI.ControlPanels.IconBar.Page_Load(Object
sender, EventArgs e) — End of inner exception stack trace —


This is likely due to duplicate Keys in the DeskTopModules table. 
In our case we had a third party Google Analytics Module installed and the newer
versions of DNN 5.x include Google Analytics as part of the core.  Apparently
during the upgrade process DNN inserts a new record in the DeskTopModules table
that uses the same FriendlyName as the existing 3rd party Google Analytics Module
already in use therefore creating a conflict.


Open the DesktopModules table and sort by FriendlyName Ascending
locate the duplicate key and give one of the duplicates key a unique name. 
Restart your website – found under hosting settings – and the problem should disappear.

Get Updates (it's free)

Learn how to improve your website. Amplify online marketing. And win more business.

    Find us on