Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

Validating a certificate in Hololens

I am currently building a HoloLens project that makes REST requests to Trello's API.This project uses external dll's, among which RestSharp and Manatee.Json.

Curently, my project runs perfectly on Unity's "Play mode". However, when I try to build the project, I get the following error :

Assets\Scripts\Controller\RestController.cs(25,9): error CS0103: The name 'ServicePointManager' does not exist in the current context

Here is the incriminated line :

ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };

I believe I get the error because ServicePointManager is not part of .net Core, which is HoloLens build target.

I tried removing this line entirely, and the project manages to build properly. However, at runtime I get the following error :

TlsException: Invalid certificate received from server. Error code: 0xffffffff80092012
Mono.Security.Protocol.Tls.Handshake.Client.TlsServerCertificate.validateCertificates (Mono.Security.X509.X509CertificateCollection certificates)

Googling the error yield solutions using the ServicePointManager.ServerCertificateValidationCallback method, which I can't use do due to .net Core restrictions.

What is the proper way to validate Trello's certificate for Hololens ?


Curent Settings:

  • Unity 5.5.0f3 & HoloToolkit v 1.5.5.0
  • Build settings : SDK Universal 10, Target device Hololens, Build Type D3D
  • Compilation override : Use Net Core
  • On all my DLL's : Checkbox "Don't Process" ticked
Sign In or Register to comment.