+1-888-365-2779
Try Now
More in this section

Forums / Bugs & Issues / Intermittent Exception - An item with the same key has already been added

Intermittent Exception - An item with the same key has already been added

10 posts, 0 answered
  1. Fujiy
    Fujiy avatar
    8 posts
    Registered:
    18 Mar 2010
    22 Nov 2010
    Link to this post

    Sometimes I get this error:

    Server Error in '/' Application.


    An item with the same key has already been added.

    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 item with the same key has already been added.

    Source Error:

     

    Line 38: protected void Page_Load(object sender, EventArgs e)

    Line 39: {

    Line 40: if (base.Module != null)

    Line 41: {

    Line 42:             this.contolPanel = null;


    Source File: \Sitefinity\Admin\Modules.aspx.cs    Line: 40

    Stack Trace:

     

    [ArgumentException: An item with the same key has already been added.]

    System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +51

    System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +7460188

    System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value) +11

    Telerik.Cms.Engine.ContentManager.get_SecurityRoots() +289

    Telerik.Cms.Engine.GenericContentModule.get_SecurityRoots() +34

    Telerik.Cms.Web.UI.Util.CheckPermissions(IModule module, Int32 perm) +150

    Telerik.Cms.Web.UI.Util.CheckMinimalPermissions(IModule module) +44

    Telerik.Cms.Web.ModulesAdminPage.get_Module() +424

       Modules.Page_Load(Object sender, EventArgs e) in d:\Sites\HOYA\Internet-freeform\Sitefinity\Admin\Modules.aspx.cs:40

    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14

       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35

    System.Web.UI.Control.OnLoad(EventArgs e) +99

    Telerik.Cms.Web.CmsPageBase.OnLoad(EventArgs e) +82

    Telerik.Cms.Web.AdminPage.OnLoad(EventArgs e) +45

       System.Web.UI.Control.LoadRecursive() +50

    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

     


    Version Information: Microsoft .NET Framework Version:2.0.50727.3053; ASP.NET Version:2.0.50727.4028

  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    22 Nov 2010
    Link to this post
    Hi Fujiy,

    It is possible that the application gets recycled at the same time when you request a module which results in  duplicate key. I believe that if you refresh the page the error will disappear.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. Fujiy
    Fujiy avatar
    8 posts
    Registered:
    18 Mar 2010
    22 Nov 2010
    Link to this post

    Yes, works at refresh.

    But dont exists any solution?

  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    22 Nov 2010
    Link to this post
    Hello Fujiy,

    This is an issue that we have logged for fixing and the problem appears on application restart.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  5. Miguel
    Miguel avatar
    1 posts
    Registered:
    01 Dec 2010
    11 Jan 2011
    Link to this post
    Hello Ivan

    I am sorry, I did not understand what the solution will be for this issue.
    I am having the same problem with the CalculatedColumn

    Could you please help me out?

    Thanks!
    Miguel
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    12 Jan 2011
    Link to this post
    Hi,

    Currently I am not able to give you a solution, because this is something that we should fix in the code base. You can increase the time for the Application Pool recycling, so you will not get this error if your case is the same as this one discussed in the thread.

    Best wishes,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  7. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    16 Jan 2012
    Link to this post
    We're experiencing the exact same problem. We have 3 servers in a Network Load Balanced environment running Sitefinity 3.7 (The Telerik.cms.dll version is 3.7.2096.2).

    We recently developed a new component for this application and after deployment (+- a month ago) this is the first time we're seeing this problem. It hasn't happened prior to this either.

    Was a solution ever found for this?

    Jacques
  8. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    17 Jan 2012
    Link to this post
    Hello,

    This error comes when the application gets recycled. As far as I remember the issue is not fixed in 3.x editions.

    Greetings,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. Jacques
    Jacques avatar
    427 posts
    Registered:
    28 Jun 2007
    17 Jan 2012
    Link to this post
    So in 3.x it was just left broken? Surely you guys are still supporting 3.x?

    Looking at the event logs, the problem seems to have stopped at some point last night, but for no reason that we know of.

    What are the possible reasons for this problem occurring? Is it possible that some problem occurred with the NLB? For example we found the following error in the event logs of one of the nodes in the cluster: Initiating convergence on host 2.  Reason: Host 3 is leaving the cluster.

    Jacques
  10. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    19 Sep 2016
    18 Jan 2012
    Link to this post
    Hi,

    The reasons that could come from our code are related to

    1. Application restart
    2. You can a custom provider that uses ContentManager and it is not configured properly in the web.config or you have modified the default configuration of the Generic Content provider.

    All the best,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Register for webinar
10 posts, 0 answered