Given Key & Same Key ERRORS

Mar 3, 2009 at 9:07 PM
I get this error just by clicking on 
Display settings (powered by Bewise) in the list 

The given key was not present in the dictionary.   at System.ThrowHelper.ThrowKeyNotFoundException()
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at Bewise.SharePoint.SPListDisplaySetting.ListDisplayPage.RenderOption(SPField field, String mode, Boolean& showWhere)
   at Bewise.SharePoint.SPListDisplaySetting.ListDisplayPage.RenderOptions(SPField field)
   at Bewise.SharePoint.SPListDisplaySetting.ListDisplayPage.PrepareRenderPage()
   at Bewise.SharePoint.SPListDisplaySetting.ListDisplayPage.OnLoad(EventArgs e)
   at System.Web.UI.Control.LoadRecursive()
   at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
 

AND

I get this if I try to connect 2 webparts together with one of the webparts using or previously using your code.

 

Server Error in '/' Application.

An entry with the same key already exists.

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 entry with the same key already exists.

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: An entry with the same key already exists.]
   System.Collections.Specialized.ListDictionary.Add(Object key, Object value) +5163435
   Microsoft.SharePoint.SPListItemCollectionPosition.ExtractPagingInfo() +158
   Microsoft.SharePoint.SPListItemCollectionPosition..ctor(String strData) +56
   Microsoft.SharePoint.SPListItemCollection.EnsureListItemsData() +1158
   Microsoft.SharePoint.SPListItemCollection.GetDataTable() +182
   Microsoft.SharePoint.WebPartPages.ListViewWebPart.GetDataTableFromListView() +715
   Microsoft.SharePoint.WebPartPages.ListViewWebPart.EnsureConnectionData(Boolean fForceSetTables) +462
   Microsoft.SharePoint.WebPartPages.ListViewWebPart.EnsureData(Int32 token) +855
   Microsoft.SharePoint.WebPartPages.SharePointDataProvider.Execute() +291
   Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateV2Connections() +934
   Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateV2ConnectionsAndSharePointDataFetch() +101
   Microsoft.SharePoint.WebPartPages.SPWebPartManager.ActivateConnections() +87
   System.Web.UI.WebControls.WebParts.WebPartManager.OnPageLoadComplete(Object sender, EventArgs e) +55
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.Page.OnLoadComplete(EventArgs e) +8698566
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +735

ANY Clues, because removing all your code will be a major headache