Unfortunately, the AuthenticationProviderSymmetricKey constructor does not work. It generates an exception: 'argument couldn't be null' (for secondaryKey).
due to the constructor definition:
To resolve this, you probably need to either modify the constructor of AuthenticationProviderSymmetricKey to accept the secondaryKey parameter as null, or update the example code to use primaryKey and secondaryKey.
It's not very clear in my mind whether it's necessary to provide the secondaryKey.
In the v1 version of the SDK, it was possible to provide only the primaryKey to SecurityProviderSymmetricKey
Hello I implemented communication between a device and a IotHub. I use previews/v2 SDK
Context
OS, version, SKU and CPU architecture used: Windows 10 Enterprise | Intel(R) Core(TM) i7 Application's .NET Target Framework : net6.0 Device: Laptop SDK version used: v2-preview007
Description of the issue
In the public async Task RunSampleAsync() method of ProvisioningDeviceClientSample.cs, the following code is called:![image](https://github.com/Azure/azure-iot-sdk-csharp/assets/133333201/2397bfd6-d4d8-401b-8c36-835fb630ef15)
Unfortunately, the AuthenticationProviderSymmetricKey constructor does not work. It generates an exception: 'argument couldn't be null' (for secondaryKey).
due to the constructor definition:![image](https://github.com/Azure/azure-iot-sdk-csharp/assets/133333201/3e70fc58-d410-472b-812e-c1fbb7f414a3)
To resolve this, you probably need to either modify the constructor of AuthenticationProviderSymmetricKey to accept the secondaryKey parameter as null, or update the example code to use primaryKey and secondaryKey.
It's not very clear in my mind whether it's necessary to provide the secondaryKey. In the v1 version of the SDK, it was possible to provide only the primaryKey to SecurityProviderSymmetricKey