DNN Forums

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

Portal Error Going to Edit Mode

Sort:
You are not authorized to post a reply.





Veteran Member





    I have a DNN 9.9.1 in which there are two portals.  One portal is working fine. For the second portal, going to edit mode results in this:

    Server Error in '/' Application.

     An entry with the same key already exists.
      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 entry with the same key already exists.

     Source Error:

        [No relevant source lines]

      Source File:  c:\inetpub\vhosts\dev.hsc.com\tmp\root\d204065e\85bd8cfe\App_Web_vlvcbqh0.2.cs  Line:  0

     Stack Trace:

        [ArgumentException: An entry with the same key already exists.]
       System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52
       System.Collections.Generic.SortedList`2.Add(TKey key, TValue value) +6893600
       DotNetNuke.Entities.Modules.DesktopModuleController.GetPortalDesktopModules(Int32 portalId) +196
       DotNetNuke.Web.Components.Controllers.ControlBarController.GetCategoryDesktopModules(Int32 portalId, String category, String searchTerm) +177
       Dnn.EditBar.UI.Items.AddModuleMenu.Visible() +80
       Dnn.EditBar.UI.Controllers.<>c.b__4_0(BaseMenuItem m) +12
       System.Linq.WhereListIterator`1.MoveNext() +73
       System.Linq.Buffer`1..ctor(IEnumerable`1 source) +192
       System.Linq.d__1.MoveNext() +175
       System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +387
       System.Linq.Enumerable.ToList(IEnumerable`1 source) +58
       Dnn.EditBar.UI.Controllers.EditBarController.GetMenuItems() +500
       Dnn.EditBar.UI.Controllers.ContentEditorManager.OnInit(EventArgs e) +257
       System.Web.UI.Control.InitRecursive(Control namingContainer) +139
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +185
       System.Web.UI.ControlCollection.Add(Control child) +86
       Dnn.EditBar.UI.HttpModules.EditBarModule.OnSkinInit(Object sender, SkinEventArgs e) +327
       DotNetNuke.UI.Skins.Skin.InvokeSkinEvents(SkinEventType skinEventType) +285
       DotNetNuke.UI.Skins.Skin.OnInit(EventArgs e) +512
       System.Web.UI.Control.InitRecursive(Control namingContainer) +139
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +185
       System.Web.UI.ControlCollection.Add(Control child) +86
       DotNetNuke.Framework.DefaultPage.OnInit(EventArgs e) +1584
       System.Web.UI.Control.InitRecursive(Control namingContainer) +139
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +408

    [PageLoadException: An entry with the same key already exists.]
       DotNetNuke.Services.Exceptions.Exceptions.ProcessPageLoadException(Exception exc, String URL) +468
       DotNetNuke.Framework.PageBase.OnError(EventArgs e) +743
       System.Web.UI.Page.HandleError(Exception e) +84
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6560
       System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +245
       System.Web.UI.Page.ProcessRequest() +72
       System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +22
       System.Web.UI.Page.ProcessRequest(HttpContext context) +58
       ASP.default_aspx.ProcessRequest(HttpContext context) in c:\inetpub\vhosts\dev.hsc.com\tmp\root\d204065e\85bd8cfe\App_Web_vlvcbqh0.2.cs:0
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +188
       System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +71

    ---------------------------

    I can clear the error by opening the browser's developer tools, go to Storage and remove LastPageId.  Then I can get back to the page, but I'm not in Edit mode.

    If I create a third portal with the Blank template, the same error occurs.  I cannot get into Edit mode.

    I'm looking for suggestgions to fix this ...

    Joe Craig
    DNN MVP
    Patapsco Research Group





    Veteran Member





      duplicate DesktopModuleIDs in PortalDesktopModules referring to orphan entry in DesktopModules.

      Actually there were two orphan items in DesktopModules that referred to two different versions of a module what was removed more than 10 years ago! Something didn't uninstall very well ...

      Problem solved. Thanks to Sebastian Leupold for help.
      Joe Craig
      DNN MVP
      Patapsco Research Group
      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