We get this exception, and this is why I changed Dictionary to ConcurrentDictionary:
Result StackTrace:
at System.Threading.Tasks.Task1.GetResultCore(Boolean waitCompletionNotification) at Narochno.Credstash.Configuration.CredstashConfigurationProvider.Load() at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at ...
----- Inner Stack Trace -----
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Narochno.Credstash.Configuration.CredstashConfigurationProvider.SetConfigValueAsync(Dictionary2 data, String entry)
at Narochno.Credstash.Configuration.CredstashConfigurationProvider.<>cDisplayClass6_0.<b1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Narochno.Credstash.Configuration.ParallelExtensions.<>cDisplayClass0_1`1.<b1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Narochno.Credstash.Configuration.CredstashConfigurationProvider.LoadAsync()
Result Message:
System.AggregateException : One or more errors occurred. (Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.)
---- System.InvalidOperationException : Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
We get this exception, and this is why I changed Dictionary to ConcurrentDictionary:
Result StackTrace:
at System.Threading.Tasks.Task
1.GetResultCore(Boolean waitCompletionNotification) at Narochno.Credstash.Configuration.CredstashConfigurationProvider.Load() at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList
1 providers) at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build() at ...----- Inner Stack Trace ----- at System.Collections.Generic.Dictionaryb1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Narochno.Credstash.Configuration.ParallelExtensions.<>cDisplayClass0_1`1.<b 1>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Narochno.Credstash.Configuration.CredstashConfigurationProvider.LoadAsync()
Result Message:
System.AggregateException : One or more errors occurred. (Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.)
---- System.InvalidOperationException : Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at Narochno.Credstash.Configuration.CredstashConfigurationProvider.SetConfigValueAsync(Dictionary
2 data, String entry) at Narochno.Credstash.Configuration.CredstashConfigurationProvider.<>cDisplayClass6_0.<