Applications Systems

Error: Item has already been added. Key in dictionary: 'period' Key being added: 'period.'

This article provides brief information on the following error: Item has already been added. Key in dictionary: 'period' Key being added: 'period.

First published date

10/10/2018 8:31 PM

Last published date

2/10/2026 11:17 PM

Overview

Error 1:

This article provides brief information on the following error:

Item has already been added. Key in dictionary: 'period' Key being added: 'period.

Error 2:

You may see similar but slightly different errors when you modify the sample Interval, Date Span, Default Zoom of a SAM AppInsight for AD Charts Resource(s) that are added to the custom report.

2025-10-08 10:32:50,457 [139] (166) ERROR SolarWinds.Orion.Web.Reporting.ReportPreviewControl - (null) Error setting up report cell during setup 'Domain Objects.'
System.ArgumentException: Item has already been added. Key in dictionary: 'samplesize' Key being added: 'samplesize'

2025-10-08 10:32:50,457 [139] (166) ERROR SolarWinds.Orion.Web.Reporting.ReportPreviewControl - (null) Error setting up report cell during setup 'User and Computer Events on the Node.'
System.ArgumentException: Item has already been added. Key in dictionary: 'samplesize' Key being added: 'samplesize'

The two errors listed above relates to 'Domain Objects.' and 'User and Computer Events on the Node.' AD charts.

 

Product section

Server Application Monitor

Cause

This has been identified as a known issue in SAM 2025.2.1.

Resolution

Solution for Error 1:

Warning: SolarWinds strongly recommends that you create a backup of your database. This procedure can create permanent changes on your database. 

1. Check the ResourceProperties table in your Orion database. There should not be any records with ResourceID = 0.

You can use the following query to find any:

SELECT * FROM ResourceProperties WHERE ResourceID ='0'

2. Delete any rows/records with ResourceID = 0.  This can be accomplished via the following query **Note:  Please make sure you have a backup of your database before you perform any delete statements on the database**

DELETE FROM ResourceProperties WHERE ResourceID='0'

 

Solution for Error 2:

As of 2025.2.1, this is confirmed as a known issue and is addressed in 2026.1. Consider upgrading your environment.

Workaround:

modify incorrect chart template for broken SAM resource

To do it you will need to (Please note, these changes will roll back when you rebuild the website (default Config wizard run) or re-install or upgrade SolarWinds):
a) Find corresponding template for each chart.

For example: "Replication Events" chart template is located at "c:\Program Files\SolarWinds\Orion\Web\Orion\APM\Resources\ActiveDirectoryBlackBox\DomainObjects.template" file.

b) Within the template file(s) update as below:
- "SampleSize" instead of "samplesize"
- "ChartDateSpan" instead of "chartdatespan"
- "ChartInitialZoom" instead of "chartinitialzoom",
- "componentsUIDs" instead of "componentsuids".

Repeat this step for all Resources which have problems with sample size/Datespan/Zoom value changes

c) Once the templates are updated you will need to regenerate web resource cache.
To do so:
Just stop SolarWinds Web Site service (SolarWinds NetPerfMon) > Don't forget to backup it before> Delete the file C:\ProgramData\SolarWinds\Orion\WebResourceCache.xml 

d) After SolarWinds Web Site service started > Edit the report > Delete the problem Charts resources and add them again.