DNN Forums

Ask questions about your website to get help learning DNN and help resolve issues.

Installing Module Error - Duplicate Key

Sort:
You are not authorized to post a reply.





New Around Here





    Hello, I am having an issue with installing a module I created. On my local machine, there are no issues. The module is installed and working, however when I try to install it on a live site, it comes up with an error about a duplicate key. I have checked all Module tables in the database, and there are no existing issues. Here is the error below. Any direction would be appreciated. 

    2020-01-16 16:54:20.369+00:00 [EC2AMAZ-NL25IAI][D:2][T:7][FATAL] DotNetNuke.Web.Common.Internal.DotNetNukeHttpApplication - 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 DotNetNuke.Entities.Modules.Definitions.ModuleDefinitionInfo.ReadModuleControls(XmlReader reader)
       at DotNetNuke.Entities.Modules.Definitions.ModuleDefinitionInfo.ReadXml(XmlReader reader)
       at DotNetNuke.Entities.Modules.DesktopModuleInfo.ReadModuleDefinitions(XmlReader reader)
       at DotNetNuke.Entities.Modules.DesktopModuleInfo.ReadXml(XmlReader reader)
       at DotNetNuke.Common.Utilities.CBO.DeserializeObject[TObject](XmlReader reader)
       at DotNetNuke.Services.Installer.Installers.ModuleInstaller.ReadManifest(XPathNavigator manifestNav)
       at DotNetNuke.Services.Installer.Installers.InstallerFactory.GetInstaller(XPathNavigator manifestNav, PackageInfo package)
       at DotNetNuke.Services.Installer.Installers.PackageInstaller.ReadComponents(XPathNavigator manifestNav)
       at DotNetNuke.Services.Installer.Installers.PackageInstaller.ReadManifest(XPathNavigator manifestNav)
       at DotNetNuke.Services.Installer.Installers.PackageInstaller..ctor(String packageManifest, InstallerInfo info)
       at DotNetNuke.Services.Installer.Installer.ProcessPackages(XPathNavigator rootNav)
       at DotNetNuke.Services.Installer.Installer.ReadManifest(Boolean deleteTemp)
       at Dnn.PersonaBar.Extensions.Components.InstallController.GetInstaller(Stream stream, String fileName, Int32 portalId, String legacySkin, Boolean isPortalPackage)
       at Dnn.PersonaBar.Extensions.Components.InstallController.ParsePackage(PortalSettings portalSettings, UserInfo user, String filePath, Stream stream)
       at Dnn.PersonaBar.Extensions.Services.ExtensionsController.<>c__DisplayClass40_1.b__1(Object )
       at System.Web.Util.SynchronizationHelper.SafeWrapCallback(Action action)

     

    Thanks.






    New Around Here





      For anyone who finds this in the future the error was in my ModuleName.dnn file. There were two ModuleControls with the same name.





      New Around Here





        I am having an error 500. Admin log says... An entry with the same key already exists. I have deleted all objects in the recycle bin, but the error persists






        Veteran Member





          A few details would be helpful.

          Which version of DNN?
          Which table?
          Did this happen installing a module, or something else?
          If a module, which one?
          Joe Craig
          DNN MVP
          Patapsco Research Group





          New Around Here





            my dnn is version 8. the error message did not mention the table name. This happens when I edit a module (all modules I edit).  here is the dump...

            Message:An entry with the same key already exists.

            StackTrace:

            
             

             

            InnerMessage:An entry with the same key already exists.

            InnerStackTrace:

            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.Web.Components.Controllers.ControlBarController.GetCategoryDesktopModules(Int32 portalId, String category, String searchTerm) 
            at Dnn.EditBar.UI.Items.AddModuleMenu.Visible() 
            at System.Linq.Enumerable.WhereListIterator`1.MoveNext() 
            at System.Linq.Buffer`1..ctor(IEnumerable`1 source) 
            at System.Linq.OrderedEnumerable`1.d__1.MoveNext() 
            at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) 
            at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) 
            at Dnn.EditBar.UI.Controllers.EditBarController.GetMenuItems() 
            at Dnn.EditBar.UI.Controllers.ContentEditorManager.OnInit(EventArgs e) 
            at System.Web.UI.Control.InitRecursive(Control namingContainer) 
            at System.Web.UI.Control.AddedControl(Control control, Int32 index) 
            at Dnn.EditBar.UI.HttpModules.EditBarModule.OnSkinInit(Object sender, SkinEventArgs e) 
            at DotNetNuke.UI.Skins.Skin.InvokeSkinEvents(SkinEventType skinEventType) 
            at DotNetNuke.UI.Skins.Skin.OnInit(EventArgs e) 
            at System.Web.UI.Control.InitRecursive(Control namingContainer) 
            at System.Web.UI.Control.AddedControl(Control control, Int32 index) 
            at DotNetNuke.Framework.DefaultPage.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) 
            at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

             

            Source:

            FileName:

            FileLineNumber:0

            FileColumnNumber:0

            Method:






            New Around Here





              BTW, this happens every time I edit a page.






              Veteran Member





                OK, and which version of DNN 8. Look in Host Settings for the complete details.

                Is this new behavior?

                When you say "every time I am editing a page" what are you editing? Page settings or a module? Or something else.
                Joe Craig
                DNN MVP
                Patapsco Research Group





                New Around Here





                  Sorry, the version is rather v. 09.00.01 (142)

                  I deleted a page, and when I created a new page, that’s when the error started. Then all other pages when I view in edit mode give the same error 500. The message is "An entry with the same key already exists." I can’t invoke the page edit mode for all pages afterwards.





                  New Around Here





                    Hello everyone,

                    I haven't resolved my error 500, "An entry with the same key already exists." Everytime I edit a page, (envoking the page to edit mode) this error comes out. My DNN version is 9.00.01 This started when I emptied my recycle bin.

                    I appreciate much for any response.

                    You are not authorized to post a reply.

                    These Forums are dedicated to the discussion of DNN Platform.

                    For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

                    1. If you have (suspected) security issues, please DO NOT post them in the forums but instead follow the official DNN security policy
                    2. No Advertising. This includes the promotion of commercial and non-commercial products or services which are not directly related to DNN.
                    3. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
                    4. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
                    5. No Flaming or Trolling.
                    6. No Profanity, Racism, or Prejudice.
                    7. Site Moderators have the final word on approving / removing a thread or post or comment.
                    8. English language posting only, please.

                    Would you like to help us?

                    Awesome! Simply post in the forums using the link below and we'll get you started.

                    Get Involved