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.

Shared Experience: Change server address dynamically

Hi, everyone.

I am currently working on a shared experience application. And I am using the "sharing" prefab provided in the HoloToolkit, and it works well following the course 240.

However, a big issue is that every time I launch the sharingservice.exe under different network, I need to rebuild the app and redeploy it onto all the HoloLens just to change the server address.

I heard about the solution of using static IP with the same router and the solution of putting my laptop's host name as server address. But I am facing the situation that I need to run the sharingservice.exe on different laptop AND under different networks (router) every time.

The only solution I can think of is to set up a cloud service (not applicable in my case), or give user the interface to change the server address dynamically in the application.
So I am wondering if anyone has tried out changing the server address dynamically in the app? Or is it even possible with the given scripts in the "sharing" prefab?

Thank you.

Best Answers


  • I am following https://github.com/Microsoft/MixedRealityToolkit/blob/master/Sharing/Src/Source/Docs/ExtendedDocs/GettingStarted.md to build the the sharing library, I think I have all the environment needed for running BuildAll.bat, but it failed with this error.

    Any hints on what the problem could be ?

    Build FAILED.

       io\HoloToolkit.Sharing.sln" (default target) (1) ->
       rsal\CommonUniversal.vcxproj" (default target) (4) ->
       (ClCompile target) ->
       te/TransformManager.h : warning C4819: The file contains a character that cannot be represented in the current c
       ode page (936). Save the file in Unicode format to prevent data loss [C:\Users\RUSSE\Downloads\MixedRealityToolk
       io\HoloToolkit.Sharing.sln" (default target) (1) ->
       rsal\CommonUniversal.vcxproj" (default target) (4) ->
       (ClCompile target) ->
       te/TransformManager.h : error C2220: warning treated as error - no 'object' file generated [C:\Users\RUSSE\Downl
    1 Warning(s)
    1 Error(s)

    Time Elapsed 00:00:03.66

    ********** Build Failed ***********

    Press any key to continue . . .

  • It says warning treated as error. I am curious if this is anything you even need to address. Perhaps follow these steps and see if it can just be ignored:


  • Thank you so much for your help.
    But it has been a few days and I still could not figure out how to get started implementing auto discovery features using Unity. Do you by any chance know a sample project that demonstrate the auto server discovery?

  • Thank you so much! But I still get stuck in one problem:
    I enabled autoDiscoverServer and showDetailedLog in sharingStage. And according to sharingStage's debug message, it looks like in editor's play mode it can automatically find the server. But when I deploy it to HoloLens. HoloLens just kept looping in the stage "Looking for servers".

    PS: Even though in the editor's play mode the debug messages show that it found server and connected to the server, the server terminal never showed any message indicating that a client was connected.

  • Possible networking issue? Firewall, etc?


  • WanzeWanze
    edited September 2017

    Thank you Mark for your help and in time response. I tried updating unity and MRTK to the newest release and set network to private and discoverable, but still no help.

    I worked around and I decided to use static host name as a temporary solution.

  • I got the networking problem solved by enabling auto discover on the sharing prefab and totaly shutting down the firewall

    CEO UniVRsitas

  • However after establishing a connection between the hololenses and the sharing service the app doesn't work properly. I can't place the energy hub anymore. It just moves with my gaze and doesn't react to any air tap to place it.

    Anyone knows why this is so? I read that it takes 30-60 secs to 'export' the anchordata from the first hololens to the server but even after 2+mins waiting nothing happens..

    CEO UniVRsitas

Sign In or Register to comment.