Forums

Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): 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

  • Fujiy avatar

    Posted on Nov 22, 2010 (permalink)

    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

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Nov 22, 2010 (permalink)

    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

    Reply

  • Fujiy avatar

    Posted on Nov 22, 2010 (permalink)

    Yes, works at refresh.

    But dont exists any solution?

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Nov 22, 2010 (permalink)

    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

    Reply

  • Posted on Jan 11, 2011 (permalink)

    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

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Jan 12, 2011 (permalink)

    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

    Reply

  • J.Hoventer Master avatar

    Posted on Jan 16, 2012 (permalink)

    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

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Jan 17, 2012 (permalink)

    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

    Reply

  • J.Hoventer Master avatar

    Posted on Jan 17, 2012 (permalink)

    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

    Reply

  • Ivan Dimitrov Ivan Dimitrov admin's avatar

    Posted on Jan 18, 2012 (permalink)

    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

    Reply

  • Register for webinar
Skip Navigation LinksHome / Developer Network / Forums / Sitefinity Older Versions (3.x): Bugs & Issues > Intermittent Exception - An item with the same key has already been added