Giter Site home page Giter Site logo

Comments (7)

hpsin avatar hpsin commented on May 27, 2024

from windowsdeviceportalwrapper.

DavidRatliff avatar DavidRatliff commented on May 27, 2024

I have tried connecting at localhost and via internet, and with several different apps. All produce this exception. Thanks for the response!

from windowsdeviceportalwrapper.

hpsin avatar hpsin commented on May 27, 2024

Hm - do the other REST APIs work? e.g. you can get the device family? One thing to be aware of is that there might be two LaunchApplication APIs, one of which is for IoT.

from windowsdeviceportalwrapper.

DavidRatliff avatar DavidRatliff commented on May 27, 2024

Yes, upon connection I can successfully retrieve the Hololens IP, OS version, and device family.

If I'm reading the documentation correctly, there is only a single LaunchApplication request type, used for both Hololens and IoT.

from windowsdeviceportalwrapper.

hpsin avatar hpsin commented on May 27, 2024

Ah, yes, you're correct. Can you share how you're getting the AppId and the packageName?

from windowsdeviceportalwrapper.

DavidRatliff avatar DavidRatliff commented on May 27, 2024

Apologies for the inactivity, it's been finals season for me. I'm pulling that information manually from the response to the /api/app/packagemanager/packages request. For example:

appid = "Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge"
packageName = "Microsoft.MicrosoftEdge_38.14393.1770.0_neutral__8wekyb3d8bbwe"

from windowsdeviceportalwrapper.

smstuebe avatar smstuebe commented on May 27, 2024

I got it working by changing the auth to basic auth.

in HttpHeadersHelpers I added

private void ApplyHttpHeaders(
    HttpClient client,
    HttpMethods method)
{
    var byteArray = Encoding.ASCII.GetBytes($"{deviceConnection.Credentials.UserName}:{deviceConnection.Credentials.Password}");
    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));
    this.ApplyUserAgentHeader(client);
    this.ApplyCSRFHeader(client, method);
}

and I removed the credential stuff from the HttpClientHandler initializations

new HttpClientHandler
{
     //UseDefaultCredentials = false,
     //Credentials = this.deviceConnection.Credentials,
    ....
}

from windowsdeviceportalwrapper.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.