Hello @Mark B ,
I have looked into the MS Learn module named "Create your first Azure IoT Central app".
I uses the VS Code-C# variant and I was a bit lazy so I copied the program.cs code from this GitHub location as advertised in the tutorial...
My device is able to provision and I see incoming data:
I can input customer 1 and app is not crashing:
Also, a recall works for me:
Regarding the issue you have, there are two options:
- Double-check for a mistype in the device template (probably the commands)
- Try the same app using that prewritten program.cs from GitHub
If you are using one of the other options, feel free to try the other prewritten files.
Do not forget to fill in the secrets of both the device and azure maps into the source code.