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

Dheeraj Awale 21 Reputation points
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 Internet of Things
Developer technologies | .NET | Other
Developer technologies | C#
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.