Replies: 4 comments
-
Thanks for logging the issue Daniel. We'll follow up in email for now. |
Beta Was this translation helpful? Give feedback.
-
I have updated the project the current preview version of the SDK which seems to be compatible with .NET 5.0 (current preview) and should use the WebSocket-Browser implementation. Can you confirm this is correct? Did someone do a test already, with lets say "AMQP using Websocket" and verified that we calling into unsupported browser API's? Like in this case I still get the exception of above that the "Set_SslProtocols" is invoked. |
Beta Was this translation helpful? Give feedback.
-
We haven't tested the SDK with .NET 5.0 yet. I don't think there is any value in you running the preview of our SDK, though. It just adds support for the Device Streaming feature in preview in IoT Hub. |
Beta Was this translation helpful? Give feedback.
-
Hi, I have a similar question and would like to ask if this is possible? I'm using Blazor WebAssembly (.NET 7). -Microsoft.AspNetCore.Components.WebAssembly 7.0.7 error message : Operation is not supported on this platform `
|
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem? Please describe.
We are currently about to start a PoC in 2 weeks with a major retail company connecting devices to smartphones via PWA app. The customers wants to use Web Assembly. The scale of the solution is about many millions of users in the next 2 years starting Q1-2021.
Describe the solution you'd like
We would like to get support for the DeviceClient when its running in the browser using web assembly. To avoid "PlatformNotSupported" and prevent exceptions.
Describe alternatives you've considered
Alternative would be to use a custom implementation maybe without web assembly which is not what the customer prefers.
Additional context
Here is an example to what we see once we want to sent telemetry in a blazor application. An exception is thrown while setting the SslProtocol which is unsupported and in the new version of .NET flagged with an annotation. There are also analyzers available for blazor which help us to figure out what API is supported.
An example stack trace:
The .NET team has added annotation in the API to understand what is supported: https://github.com/dotnet/runtime/blob/1b18efa5b55df1cbf13838f6ba32d9d59fa147b1/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.cs#L281
We are setting some settings on the HttpClientHandler when there is no handler supplied in the ctor - which is throwing the platform exceptions. Maybe we could check in the ClientFactory what platform we are running and preconfigure a proper one and skipping the specific settings like proxy etc..
Here is an example:
azure-iot-sdk-csharp/iothub/device/src/Transport/HttpClientHelper.cs
Line 93 in d08cdad
Beta Was this translation helpful? Give feedback.
All reactions