Today, I will show you the basic idea about how to Add or Remove devices from Microsoft Azure IoT Hub using a .NET based web application. We will also show the total number of devices that are connected to the IoT Hub.
Let’s start from Microsoft Azure Portal. As you can see the in the screenshot that shows two devices are available in Azure Portal under IoT Hub.
The web application that we have developed, it shows the devices and total number of devices present in the IoT Hub.
Now, let’s add a device using our web application. It will be added directly to our IoT Hub Devices Section. We can add a device using Azure Portal and it will be added to our Web Application as well. In the web application, type a Device Id and press the Add button.
We can see our added device by refreshing both web application Azure IoT Hub Devices section.
Total Number of devices section is also updated after adding the device.
Now, let’s remove a device from Azure IoT Hub using the web application. In the web application, click a Device row in the grid and press the Remove button.
You can see that your selected device is removed successfully in web application as well as from the Azure IoT Hub Devices section.
I hope you found this blog post helpful. For any queries, feel free to contact me [email protected]