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

Forums / Set-up & Installation / ERROR: An item with the same key has already been added.

ERROR: An item with the same key has already been added.

2 posts, 0 answered
  1. Andrew Wrigley
    Andrew Wrigley avatar
    63 posts
    Registered:
    01 Sep 2009
    18 Nov 2009
    Link to this post
    I have just created a website using sitefinity.  It doesn't use a template.  The first time I try to login, I get the following error:

    Server Error in '/WScmssf' 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 267:            foreach (IWebModule module in ModuleManager.GetWebModulesValues())Line 268:            {Line 269:                if (module is SecuredModule && ((SecuredModule)module).CanCreate())Line 270:                    webModules.Add(module);Line 271:            }

    Source File: c:\Program Files\telerik\Sitefinity3.7\WebSites\WScmssf\Sitefinity\Admin\Default.aspx.cs    Line: 269 

    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) +7462172   Telerik.Security.Permissions.SecuredBase.GetPermissions(String roleProvider) +347   Telerik.Security.Permissions.ApplicationPermission.BuildPermission(ISecured secured, String roleProvider, IDictionary`2& permissions, String[] roles) +74   Telerik.Security.Permissions.ApplicationPermission.CheckDemand() +229   Telerik.Security.Permissions.SecuredModule.CanCreate() +172   Admin_Default.Page_Load(Object sender, EventArgs e) in c:\Program Files\telerik\Sitefinity3.7\WebSites\WScmssf\Sitefinity\Admin\Default.aspx.cs:269   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) +55   Telerik.Cms.Web.AdminPage.OnLoad(EventArgs e) +20   Admin_Default.OnLoad(EventArgs e) in c:\Program Files\telerik\Sitefinity3.7\WebSites\WScmssf\Sitefinity\Admin\Default.aspx.cs:69   System.Web.UI.Control.LoadRecursive() +50   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627

    Can you advise as to the possible cause?

    Andrew
  2. Andrew Wrigley
    Andrew Wrigley avatar
    63 posts
    Registered:
    01 Sep 2009
    18 Nov 2009
    Link to this post
    Ok, it must be a permissions issue because:

    I copied the site files to My Docs and opened them using Visual Studio.  It is now working fine.
2 posts, 0 answered