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.
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
HttpClient 'Platform.AccessDeniedException'
Hi all,
my HttpClient is working in a UWP app but it fails inside a Hololense build:
Unhandled 'Platform.AccessDeniedException' exception caught! - Access denied
Uri host = new Uri("http://foo/bar"); var myClient = new HttpClient(); string response = await myClient.GetStringAsync(host);
I'm using the Holo emulator. Edge has access to the internet.
Do I need some sort of permission?
Thanks.
0
Best Answer
-
OptionsDavidKlineMS mod
@CauchY,
It sounds like you need to enable internet capabilities for your application. To do this:- Go to Edit > Project Settings > Player
- Select the Windows Store icon in the Inspector
- Expand Publishing Settings and scroll down the Capabilities
- Check InternetClient (and InternetClientServer if just InternetClient is not sufficient)
Then build as usual in Unity and Visual Studio.
Thanks!
David2
Answers
If I use the UnityWebRequest/WWW class, it works in Unity's Game mode. But it says "Cannot resolve destination host" in the HoloEmulator.
Weird stuff is going on inside the Hololense. Everything works great until I try to use it with the Hololens.
@CauchY,
It sounds like you need to enable internet capabilities for your application. To do this:
Then build as usual in Unity and Visual Studio.
Thanks!
David
@DavidKlineMS
Thanks for the tip, I didn't think about that.
WWW works now.
Unfortunately, awaiting the HttpClient still not working. I even disabled the firewall for testing.