hak
hak

Reputation: 69

UploadBlob async triggers System.PlatformNotSupportedException on Microsoft.Azure.Device.client

I have a .Net4.8 App which reference a NetStandard library 2.0 which reference the Microsoft.Azure.device.Client 1.25 library.

Most of the functionality are working fine expect when I am trying to call:

        _client?.UploadToBlobAsync(blobName, source).Wait();

In this case I am getting a:

System.PlatformNotSupportedException: 'Operation is not supported on this platform.'

The reason is at the:

at System.Net.Http.HttpClientHandler.set_SslProtocols(SslProtocols value) at Microsoft.Azure.Devices.Client.Transport.HttpClientHelper..ctor(Uri baseAddress, IAuthorizationProvider authenticationHeaderProvider, IDictionary2 defaultErrorMapping, TimeSpan timeout, Action1 preRequestActionForAllRequests, X509Certificate2 clientCert, HttpClientHandler httpClientHandler, ProductInfo productInfo, IWebProxy proxy) at Microsoft.Azure.Devices.Client.Transport.HttpTransportHandler..ctor(IPipelineContext context, IotHubConnectionString iotHubConnectionString, Http1TransportSettings transportSettings, HttpClientHandler httpClientHandler) at Microsoft.Azure.Devices.Client.InternalClient.UploadToBlobAsync(String blobName, Stream source, CancellationToken cancellationToken) at Microsoft.Azure.Devices.Client.DeviceClient.UploadToBlobAsync(String blobName, Stream source)

This issue seems to have been reported many times from what I can read it should not be there on the .Net framework 4.7.2 and above.

Could you please tell me more about it.

Thanks in advance, Hak

Upvotes: 0

Views: 108

Answers (0)

Related Questions