Search code examples
azureiotazure-iot-hubazure-iot-sdkazure-iot-suite

An unhandled exception of type 'System.FormatException' occurred in Microsoft.Azure.Devices.dll


I'm referring this tutorial to create a device identity. However, getting an exception as below:

enter image description here

Here is my config file:

enter image description here

Edit:
What is this Instrumentation key and value in App.Config? I just copied from the sample code. However, from where can I get it, in case I'm using a real device?

Am I missing any SDK or anything else? Do I need to download something extra? the tutorial does not suggest anything. Even when I'm running sample code from GiTHub getting the same error.


Solution

  • the following screen snippet shows a reason of this error, such as connectionString.

    Error

    Use the connectionString from your Azure IoT Hub - see the tutorial section Create an IoT Hub step 6.