Microsoft Azure IoT Device Management using .NET based Web Application

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.

blog1 - Microsoft Azure IoT Device Management using .NET based Web Application

The web application that we have developed, it shows the devices and total number of devices present in the IoT Hub.

Blog2 - Microsoft Azure IoT Device Management using .NET based Web Application

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.

blog3 - Microsoft Azure IoT Device Management using .NET based Web Application

We can see our added device by refreshing both web application Azure IoT Hub Devices section.

blog3 1 - Microsoft Azure IoT Device Management using .NET based Web Application

Total Number of devices section is also updated after adding the device.

blog4 - Microsoft Azure IoT Device Management using .NET based Web Application

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.

remove - Microsoft Azure IoT Device Management using .NET based Web Application

You can see that your selected device is removed successfully in web application as well as from the Azure IoT Hub Devices section.

remove2 - Microsoft Azure IoT Device Management using .NET based Web Application

 

remove3 - Microsoft Azure IoT Device Management using .NET based Web Application

I hope you found this blog post helpful. For any queries, feel free to contact me farrukh.ahmed@kaispe.com

Leave a Reply

avatar
  Subscribe  
Notify of