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

Error 403 on Uploading file with REST API and Wifi

Hello,
I have made a program to upload files on Hololens without using the web interface. It uses the Rest API as do the web interface.
This works perfectly when connected in USB.
But on Wifi I receive an error 403. As long as the web interface allows the user to upload a file on Wifi, I don't understand what I'm missing. :/
Any clue ?

Best Answer

  • Options
    Answer ✓

    @Hutin,
    It appears that you are running into a security feature of the Windows Device Portal. Without passing the proper token in the request headers, Windows Device Portal will only allow GET calls. PUT, POST, etc will all return the 403 code you are seeing.

    You may be interested in the Windows Device Portal Wrapper project on GitHub. It implements automatic security handling and has an issue open to implement the manual security mechanism. I highly recommend using (and contributing to) the wrapper project as it supports all Windows 10 devices, including Xbox One.

    Alternatively, you can disable HTTPS in the Windows Device Portal on your HoloLens. This will cause it to behave over WiFi like it does over USB. I do not recommend this option unless you are on a secure and trusted network.

    Thanks!
    David

Answers

  • Options
    Answer ✓

    @Hutin,
    It appears that you are running into a security feature of the Windows Device Portal. Without passing the proper token in the request headers, Windows Device Portal will only allow GET calls. PUT, POST, etc will all return the 403 code you are seeing.

    You may be interested in the Windows Device Portal Wrapper project on GitHub. It implements automatic security handling and has an issue open to implement the manual security mechanism. I highly recommend using (and contributing to) the wrapper project as it supports all Windows 10 devices, including Xbox One.

    Alternatively, you can disable HTTPS in the Windows Device Portal on your HoloLens. This will cause it to behave over WiFi like it does over USB. I do not recommend this option unless you are on a secure and trusted network.

    Thanks!
    David

  • Options

    Alright, I will run it without SSL for the moment, thank you for the answer.

    Nevertheless I don't undestand what "proper token in the request headers" you are talking about?

Sign In or Register to comment.