How to use Microsoft Azure DeviceClient with MQTT in .Net Framework 4.6.1

dheeraj awale 1 Reputation point
2024-03-17T14:01:38.5733333+00:00

For a legacy WinForms application (.NET Frm. 4.6.1), I need to use Azure IOT device client to send events.

When trying to create an instance like below with MQTT type, It throws "Operation is not supported on this platform." error.

DeviceClient deviceClient = DeviceClient.CreateFromConnectionString(deviceConnectionString, TransportType.Mqtt, options);

If tried with HTTP then it throws: "Plug and Play is not supported over the HTTP transport."

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
379 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,376 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,249 questions
{count} votes