I'm using the Library WindowsDevicePortalWrapper to connect to my HoloLens.
I run the following code from a console app:
var connection = new DefaultDevicePortalConnection("http://172.16.0.11", "admin", "<password>");
DevicePortal dp = new DevicePortal(connection);
var batt = dp.GetBatteryStateAsync().GetAwaiter().GetResult();
on the batter request, I am getting the following exception:
Microsoft.Tools.WindowsDevicePortal.DevicePortalException occurred
HResult=0x80131500 Message= Source=WindowsDevicePortalWrapper
StackTrace: at Microsoft.Tools.WindowsDevicePortal.DevicePortal.d__11.MoveNext() in C:\data\WDPW\WindowsDevicePortalWrapper\WindowsDevicePortalWrapper\HttpRest\RestGet.cs:line 42 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.ConfiguredTaskAwaitable1.ConfiguredTaskAwaiter.GetResult() at Microsoft.Tools.WindowsDevicePortal.DevicePortal.<GetAsync>d__330
1.MoveNext() in C:\data\WDPW\WindowsDevicePortalWrapper\WindowsDevicePortalWrapper.Shared\HttpRest\RestGet.cs:line 39 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter1.GetResult() at Microsoft.Tools.WindowsDevicePortal.DevicePortal.<GetBatteryStateAsync>d__124.MoveNext() in C:\data\WDPW\WindowsDevicePortalWrapper\WindowsDevicePortalWrapper.Shared\Core\Power.cs:line 69 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter
1.GetResult()
Notice that the message of the exception is empty. I have tried several commands, including getKNownFoldersAsync and UploadFileAsync (and more) but the all return this exception with no message. Any ideas what going on?
User contributions licensed under CC BY-SA 3.0