I am receiving this error when I try to connect to Azure IoT Hub. Microsoft.Azure.Devices.Client.Exceptions.UnauthorizedException.
I could not post the error screen shots here, since I do not have enough reputation points. So instead I wrote the whole details at http://azuregeon.blogspot.in/2017/10/azure-iot-c-certificate-connectivity.html
if anyone gets a chance please have a look.