SharePoint - Item has already been added. Key in dictionary: '484' Key being added: '484'
A few weeks back, a customer of mine began seeing an error on every write action from the Central Administration site. The error on the page stated that " Item has already been added. Key in dictionary: '484' Key being added: '484' " and was generated by any updates to the current settings. Searching around, I found a few people posting resolutions about deleting database rows in the Objects table in the SharePoint Config database. Of course this is an unsupported fix and no changes should ever be made to the SharePoint databases.
Some more searching found a Codeplex project called SharePointFix. If you look at the source code, you will see
SPDiagnosticsService diagService = SPDiagnosticsService.Local;
try
{
diagService.ResetAll();
Console.WriteLine("Sucessfully Reset");
diagService.Delete();
Console.WriteLine("Sucessfully Deleted");
diagService = SPDiagnosticsService.Local;
diagService.Update();
Console.WriteLine("Sucessfully Updated");
}
catch (Exception ex)
{
Console.WriteLine("Source: " + ex.Source);
Console.WriteLine("Message: " + ex.Message);
}
The key here is the Delete() method, which will clear the rows in the Objects table ( but in a supported way). Run the code on a server with SharePoint installed and it should solve the problem.
For those who need to run it with PowerShell:
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
[Microsoft.SharePoint.Administration.SPDiagnosticsService]::Local.ResetAll() [Microsoft.SharePoint.Administration.SPDiagnosticsService]::Local.Delete() [Microsoft.SharePoint.Administration.SPDiagnosticsService]::Local.Update()
Comments
- Anonymous
February 11, 2009
PingBack from http://www.clickandsolve.com/?p=6316