Azure IoT Hub Connection

Onur Coşkun 20 Reputation points
2024-02-16T14:22:05.7233333+00:00

Hello,
I am using Azure IoT Hub for my sensor project. Since .net 8 release i wanted to update my code from .net 6 to .net 8 but after updating my code it takes about solid 1 minute to connect to IoT Hub it was 2-3 seconds in .net 6.

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,133 questions
{count} votes

Accepted answer
  1. Sander van de Velde 29,456 Reputation points MVP
    2024-02-17T16:23:18.4+00:00

    Hello @Onur Coşkun,

    welcome to this moderated Azure community forum.

    Based on your code example, I reduced it to just a console app:

    User's image

    It's based on .Net 8 LTS:

    User's image

    This way, the device clients connects within a fraction of a second.

    It seems the Azure IoT Device SDK is not the root cause of your issue.

    Please check first how your BackgroundService performs without the Device client connection.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.


0 additional answers

Sort by: Most helpful