Could not resolve host ' on HoloLens

When trying to connect to another room from an HoloLens it fails and shows this error:

Connect() to '' () failed: System.Net.Sockets.SocketException (0x80004005): Could not resolve host ''

Here is the complete log from Visual Studio:

What is strange is that my other app with the same "Connection code" is working perfectly. When I switch from IL2CPP to .NET Scripting backend it suddenly works but the other application works with IL2CPP.

This is my "Connection code:
It is one very simple script.

It works in the editor too but it fails on HoloLens Emulator or HoloLens device.

I use:
Unity 2018.2.0f2
PUN 1.91


  • Hi @Joey,

    if you want to build with IL2CPP, you have to 'remove' the library inside the Metro folder from the build process. To do so, navigate to Plugins/Metro/ and select the Photon3Unity3D.dll inside this folder. Then take a look at the inspector and uncheck the WSAPlayer option from the Include Platforms. When you now rebuild the game it should work on the HoloLens, too.

    If you want to use .NET as Scripting Backend again, don't forget to enable the above mentioned library for the WSAPlayer again.
Sign In or Register to comment.