Connecting to Hololens2 API in hololens2 app

Copper Contributor

Hello. I have some small issues while trying to connect to Hololens2 Device Portal API. 

I am using Unity 2020.3.35f1 and MRTK


I'm trying to connect to DevicePortal API with c# script. I'm using WebRequest class. The main problem is that everytime I'm trying to get response on application that is deployed to Hololens2 device I have error "the operation has timed out". The same code works perfectly in Unity, but not in hololens2 device. I'm sure that URI is correct and all parameters inside WebRequest are correrct too. On player settings I have turned on capabilities:

- internet client

- internet client server

- private network client server


Any help? 

1 Reply
update - looks like I cannot connect only to DevicePortal API. I can connect to any other API and this works fine.