Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Knowles 141 posts 222 karma points
    Dec 06, 2011 @ 10:39
    Chris Knowles
    0

    Item has already been added. Key in dictionary:

    Hi,

    I've created a usercontrol, added it to the site in a macro and when i'd put it on the page and done a save and publish, all nodes now come up with the following error.

    Server Error in '/' Application.

    Item has already been added. Key in dictionary: '28'  Key being added: '28'

    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: Item has already been added. Key in dictionary: '28'  Key being added: '28'

    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: Item has already been added. Key in dictionary: '28'  Key being added: '28']
       System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add) +9353227
       System.Collections.Hashtable.Add(Object key, Object value) +11
       umbraco.controls.ContentControl.CreateChildControls() +668
       System.Web.UI.Control.EnsureChildControls() +102
       umbraco.controls.ContentControl.OnInit(EventArgs e) +32
       System.Web.UI.Control.InitRecursive(Control namingContainer) +140
       System.Web.UI.Control.AddedControl(Control control, Int32 index) +197
       System.Web.UI.ControlCollection.Add(Control child) +79
       umbraco.cms.presentation.editContent.OnInit(EventArgs e) +1173
       System.Web.UI.Control.InitRecursive(Control namingContainer) +140
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +480
    


    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1

    Can someone help me sort this out or point me in the right direction please?

    Thanks

    Chris

  • Mike Taylor 155 posts 353 karma points
    Dec 06, 2011 @ 11:17
    Mike Taylor
    0

    Have you tried "touching" the web.config to restart the app?

  • Chris Knowles 141 posts 222 karma points
    Dec 06, 2011 @ 12:55
    Chris Knowles
    0

    Thanks Mike, I recycled the app pool and that has sorted it.

    Cheers

  • Jenni Marsh 26 posts 46 karma points
    Mar 15, 2012 @ 14:34
    Jenni Marsh
    0

    We keep getting this error. Touching the web.config is not a viable solution with an angry client on your back!

    Does anyone know the cause of this? It appears to happen at the same place - I always get key 28 being returned too. What is key 28, which piece of data does it relate to and can I manipulate anything in the database to stop this happening?

    Thanks!

    Jenni

  • Madura Silva 27 posts 79 karma points
    Sep 20, 2013 @ 09:12
    Madura Silva
    0

    Hi,

    One of my client is also complaining about the same error..

    They are doing lot of activities on backend of the website. Touching the web.config or refresh app pool is not a permanent solution. So I'm looking for a permanent fix for this. It would be great if someone can help me to fix this / some tips

    • Umbraco version: 4.7.1 (Assembly version: 1.0.4281.20201)
    • IIS version: 6
    • .NET framework: 4.0

     

    Thanks,

    Madura

  • Richard Han 19 posts 41 karma points
    Apr 23, 2014 @ 08:34
    Richard Han
    0

    It's Umbraco bug.

    You need to rebuild source code follow _http://umbraco.codeplex.com/SourceControl/changeset/18d853003c17#src/umbraco.cms/businesslogic/ContentType.cs

    More detail please see _http://richardsrhan.blogspot.tw/2011/07/umbraco-item-has-already-been-added-key.html

    Richard

Please Sign in or register to post replies

Write your reply to:

Draft