-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception on the file uploading with a x509 certificate device #60
Comments
@walkerlin-msft - We had not enabled X509 with FileUpload yet. It is in our backlog to enable it. We also welcome contributions to our repo if this interests you. You can find our contribution guideline here: https://github.com/Azure/azure-iot-sdk-csharp/blob/master/CONTRIBUTING.md |
Got it and will keep tracking the updates. |
Hello @walkerlin-msft have a look at the commit Issue #60: enabling X509 support with FileUpload and test it. The changes will be added to the master branch soon. Thanks :)! All Best. |
Hi @sergaz-msft thanks for your updates. I've tested it successfully in my codes. I'm look forward to see the release update in the master branch. |
I am trying to upload a file to IoT hub using x.509 certs but am receiving an exception every time. The exception is "Object reference not set to the instance of an object". The inner exception is below: StackTrace [string]:" at Microsoft.Azure.Devices.Client.IotHubConnectionString.Microsoft.Azure.Devices.Client.IAuthorizationProvider.GetPasswordAsync()\r\n at Microsoft.Azure.Devices.Client.Transport.HttpClientHelper.ExecuteAsync(HttpMethod httpMethod, Uri requestUri, Func I am using Microsoft.Azure.Devices.Client 1.7.2. Is file uploading using x.509 still not supported? |
@adamkjonesmesh please open a separate GH issue. |
Will do. |
I got an exception on UploadFileToBlob method in the x509 certificate device.
Does it support file upload feature in the x509 device?
(Microsoft.Azure.Devices.Client) Version: 1.2.3
Here is the log:
Type of Exception : ArgumentException
Message : '' is not a valid Base64 encoded string.
Parameter name: Key
Source : Microsoft.Azure.Devices.Client
Stack Trace : at Microsoft.Azure.Devices.Client.StringValidationHelper.EnsureBase64String(String value, String paramName)
at Microsoft.Azure.Devices.Client.IotHubConnectionString.BuildToken(TimeSpan& ttl)
at Microsoft.Azure.Devices.Client.IotHubConnectionString.GetPassword()
at Microsoft.Azure.Devices.Client.IotHubConnectionString.GetAuthorizationHeader()
at Microsoft.Azure.Devices.Client.Transport.HttpClientHelper.d__20.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Devices.Client.Transport.HttpClientHelper.d__16`2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Azure.Devices.Client.Transport.HttpTransportHandler.d__13.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
at Microsoft.SmartFactory.Devices.Client.SfDeviceClient.d__16.MoveNext() in C:\Users\a-walin\Github\MOEA-SmartFactory\sfDeviceLib\CSSDK\SfDeviceClient.cs:line 110
TargetSite : Void EnsureBase64String(System.String, System.String)
Thanks for the help.
The text was updated successfully, but these errors were encountered: