Configure a Push Agent
Add the Push Agent NetLogic from Template Libraries and configure the parameters of the Push Agent.
Prerequisites
-
Install the
MQTTNet
andNewtonSoft.Json
packages. See NuGet packages.Tip: You can check the required libraries versions in the Push Agent description in Template Libraries.
To configure a Push Agent
-
From the main toolbar, select
Template Libraries.
- In Template Libraries, search for Push Agent.
- Under Components, drag Push Agent onto NetLogic in Project view.
- Select Close.
- In Project view, select Push Agent.
-
In Properties, edit the Push Agent properties.
For more information, see Push Agent properties.
-
In Project view, double-click Push Agent.
An external editor opens in a separate tab.
- Build the project.
-
Generate CA and client certificates. See Create a certificate.
Important: Use the newest OpenSSL library and encryption algorithm supported in .NET to generate the PFX certificates. If you use the RC2 algorithm to generate the PFX certificate, certificate-based authentication for Azure IoT Hub fails on the terminal. -
Implement the PushAgent NetLogic into the application interface. See Push Agent interface.