An item with the same key has already been added

Aug 10, 2010 at 3:10 PM
Edited Aug 10, 2010 at 3:16 PM

Good day.

I have installed solution. Then i enablled ViewsPermissions in site collection feature. After that i went on list settings page, where was a link to View Page Settings. But after pressing it i have got an

error page:

An item with the same key has already been added. at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
at CodeArt.SharePoint.PermissionEx.ViewRightsSettingPart.addDisplayControls(ListViewPermissionSetting setting)
at CodeArt.SharePoint.PermissionEx.ViewRightsSettingPart.CreateChildControls()
at System.Web.UI.Control.EnsureChildControls()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

What can be a problem?

Sep 2, 2011 at 1:25 PM

I got this issue and found that it was because the list I was using had hidden views with no title.  I gather that these views are what SharePoint creates for you when you use the list in a web part and you set up the view of the list in the web part.  I have uploaded a patch to the source code which I hope will fix it.

Sep 5, 2011 at 2:24 AM

dear Chernobrivec:

I have added you as the developer of this project. if you think it's a bug , please kindly to update the source code directly.

you must use VS2010 to connect to the source code server.

Feb 16, 2012 at 2:31 AM

this issue has been resolved in the latest release 1.3.