Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Resolved Holens2 API Connectivity Issues

Discussion in 'AR' started by abitowhit, Mar 10, 2021.

  1. abitowhit

    abitowhit

    Joined:
    Aug 9, 2020
    Posts:
    13
    Hopefully not the wrong forum...

    Normally I don't reach out but I have a very simple app I am trying to create for hololens2 that simply reads and writes messages via an API which are then saved to a DB. (Anything going forward will need some way to connect for data so I need to figure it out)

    My API desktop is running on IIS http (80) on win 10 and I can connect to it without any issues both via browser and from Unity (I even added GET requests). Right now I just have it spitting out a random string which I can get every time when running Unity in the game window on that same API machine.
    Unity is 2019.3.15f1 (which btw is the only version I have been able to get fully working with the H2)
    upload_2021-3-10_16-44-59.png
    I have exhausted everything I can think of to get the data from a remote machine and the app overall appears to function correctly on the Hololens2 except for talking to the remote API/SQL/MySQL/Anything.
    H2 has no problem connecting to internet/downloading/browsing,etc.

    Using my tablet, I can open the api using IP address so the desktop is not firewall blocking the connection to port 80.
    I have tried both WebRequest and WebClient and both work as expected in the app when I run in Unity.
    I also followed instructions creating the class file/wsdl from the mono directory including system.web and system.web.services libraries (the 4.5 ones)... yep, still fails on H2.

    In Player capabilities I have checked:
    Enterprise Auth, Internet Client, InternetClientServer,PrivateNetowrkClientServer,Microphone,Chat,RemoteSystem thinking that maybe it was application permissions.

    Device Families is Holographic and again he app works as expected.

    Even tried DB direct via straight .net/c# SQLClient, MySQLClient fails as well.

    Could it possibly be permissions on the H2 blocking my connection to port 80 or am I just missing some other

    setting somewhere. It seems like it should be so simple, works on x64 and simply fails on ARM64.
    H2 is maybe 6 months old, I would have to get the rev (not dev edition)

    Thank you in advance for any help!
     
  2. abitowhit

    abitowhit

    Joined:
    Aug 9, 2020
    Posts:
    13
    Forgot to add, the current exception message using webclient is "value does not fall within the expected range" so not sure what it is looking for.
    upload_2021-3-11_17-37-34.png
    The testing url is just http://machine IP/endpoint.asmx

    if (wurl !="")
    {
    WebClient client = new WebClient();
    r = client.DownloadString(wurl);
    Debug.Log(string.Format("WebClient Says:{0}",r));

    }
     
  3. abitowhit

    abitowhit

    Joined:
    Aug 9, 2020
    Posts:
    13
    I was able to get it working with UnityWebRequest.