In one of our production environment we are getting the error message “ExceptionDetails”:“System.ArgumentException: An item with the same key has already been added.”
But this works fine in other instances.
{“FailedAt”:“2023-03-27T06:15:13.4747422Z”,“ExceptionType”:“System.ArgumentException”,“ExceptionMessage”:“An item with the same key has already been added.”,“ExceptionDetails”:“System.ArgumentException: An item with the same key has already been added.\r\n at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)\r\n at System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add)\r\n at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable
1 source, Func2 keySelector, Func
2 elementSelector, IEqualityComparer`1 comparer)\r\n at CopasysAPI.AuditRules.CPSAuditTask.Download(GetRecordsModel getrecords, String strFilePath, Int32 Id, String connectionString)”}
Any help will be highly appriciated.
Thank you,
sanjay