Select to view content in your preferred language

Could not load certain layers after updating to .NET 9 (Hashing issue ?)

272
2
Jump to solution
03-27-2025 11:45 AM
Labels (2)
EricLiu
New Contributor

Hi, we updated to .NET 9 Maui (ArcGIS 200.5) and started to get the warning / error :

Could not load layer. Error: Concurrent operations from multiple threads on this type are not supported.

From the stack trace it seems like the issue is coming from inside the runtime:

at System.Security.Cryptography.HashProviderCng.AppendHashData(ReadOnlySpan`1 source)
at System.Security.Cryptography.HashProvider.AppendHashData(Byte[] data, Int32 offset, Int32 count)
at System.Security.Cryptography.HashAlgorithm.ComputeHash(Byte[] buffer)
at Esri.ArcGISRuntime.Http.Caching.CacheEntry.HashString(String value)
at Esri.ArcGISRuntime.Http.Caching.CacheEntry.CheckVaryHeaders(HttpRequestHeaders requestHeaders)
at Esri.ArcGISRuntime.Http.Caching.CacheManager.SendUsingCachingAsync(Func`3 sendAsyncDelegate, HttpRequestMessage request, String certificateThumbprint, CancellationToken cancellationToken)
at Esri.ArcGISRuntime.Http.HttpDispatcher.SendAsync(HttpRequestMessage request, HandlerOptions options, CancellationToken cancellationToken)
at Esri.ArcGISRuntime.Internal.RequestHandler.IssueRequestAndRespond(CoreRequest request)
at VertiGIS.ArcGISExtensions.Utilities.LayerExtensions.WaitForLoaded(Layer layer)
at VertiGIS.ArcGISExtensions.Mapping.LayerExtension.OnInitialize()

From https://github.com/dotnet/runtime/issues/93205#issuecomment-2226282536 and https://github.com/robinrodricks/FluentStorage/issues/72,

It seems like the issue may be reusing instances of HashAlgorithm. Is this issue resolved in 200.6 or 200.7 ? Could you help us take a look ? Thanks.

0 Kudos
1 Solution

Accepted Solutions
MatveiStefarov
Esri Contributor

Hello Eric!  Yes, this issue is already fixed in 200.6.0.

View solution in original post

0 Kudos
2 Replies
MatveiStefarov
Esri Contributor

Hello Eric!  Yes, this issue is already fixed in 200.6.0.

0 Kudos
dotMorten_esri
Esri Notable Contributor

Also just to add to this: 200.5 was not verified for .NET 9.

200.6 officially supports .NET 9.

0 Kudos