dotnet / dotnet/core

Microsoft.Azure.Documents.Client not supported in RC2

Open
#5,357 4 comments 0 reactions 2 assignees Claimed by @bartonjs View on GitHub
Dominant language
PowerShell
Stars
22k
Forks
4.9k
Avg merge
5d 5h
Merged PRs (30d)
29

Description

# Issue Title

Microsoft.Azure.Documents.Client not supported in RC2

# General

I am trying to access an Azure CMOS database from webassembly and getting the runtime error

"Unhandled exception rendering component: System.Security.Cryptography.Algorithms is not supported on this platform."

Missing this functionality limits the usefulness of Blazor since I cannot write directly into my Cosmos database using Microsoft.Azure.DocumentDB.Core and Microsoft.Azure.Cosmos

The full error trace is
Unhandled exception rendering component: System.Security.Cryptography.Algorithms is not supported on this platform.
System.PlatformNotSupportedException: System.Security.Cryptography.Algorithms is not supported on this platform.
at System.Security.Cryptography.HMACSHA256..ctor(Byte[] key)
at Microsoft.Azure.Documents.StringHMACSHA256Hash.ComputeHash(Byte[] bytesToHash)
at Microsoft.Azure.Documents.AuthorizationHelper.GenerateKeyAuthorizationSignature(String verb, String resourceId, String resourceType, INameValueCollection headers, IComputeHash stringHMACSHA256Helper, String& payload)
at Microsoft.Azure.Documents.AuthorizationHelper.GenerateKeyAuthorizationSignature(String verb, Uri uri, INameValueCollection headers, IComputeHash stringHMACSHA256Helper, String clientVersion)
at Microsoft.Azure.Documents.Client.GatewayServiceConfigurationReader.GetDatabaseAccountAsync(Uri serviceEndpoint)
at Microsoft.Azure.Documents.Routing.GlobalEndpointManager.GetDatabaseAccountFromAnyLocationsAsync(Uri defaultEndpoint, IList`1 locations, Func`2 getDatabaseAccountFn)
at Microsoft.Azure.Documents.Client.GatewayServiceConfigurationReader.InitializeReaderAsync()
at Microsoft.Azure.Documents.Client.DocumentClient.InitializeGatewayConfigurationReader()
at Microsoft.Azure.Documents.Client.DocumentClient.GetInitializationTask(IStoreClientFactory storeClientFactory)
at Microsoft.Azure.Documents.Client.DocumentClient.EnsureValidClientAsync()
at Microsoft.Azure.Documents.Client.DocumentClient.GetCollectionCacheAsync()
at Microsoft.Azure.Documents.Query.DocumentQueryClient.Microsoft.Azure.Documents.Query.IDocumentQueryClient.GetCollectionCacheAsync()
at Microsoft.Azure.Documents.Query.DocumentQueryExecutionContextFactory.CreateDocumentQueryExecutionContextAsync(IDocumentQueryClient client, ResourceType resourceTypeEnum, Type resourceType, Expression expression, FeedOptions feedOptions, String resourceLink, Boolean isContinuationExpected, CancellationToken token, Guid correlatedActivityId)
at Microsoft.Azure.Documents.Linq.DocumentQuery`1.d__37`1[[CCWebSite.Controllers.Contact, BlazorWebSite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null],[CCWebSite.Controllers.Contact, BlazorWebSite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext()
at CCWebSite.Controllers.DocumentDBRepository`1.d__7[[CCWebSite.Controllers.Contact, BlazorWebSite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]].MoveNext() in C:\Users\budcr\source\repos\ChargeAndChange\BlazorWebSite\DocumentDBRepository.cs:line 77
at BlazorWebSite.Pages.Contacts.OnInitializedAsync() in C:\Users\budcr\source\repos\ChargeAndChange\BlazorWebSite\Pages\Contacts.razor:line 170
at Microsoft.AspNetCore.Components.ComponentBase.RunInitAndSetParametersAsync()

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.