LoopBackAccess in UWP app manifest

Paul Mariotti 11 Reputation points
2021-02-20T12:55:36.62+00:00

I am trying to restore Dropbox functionality to one of my UWP store apps. The latest OAuth2 api from Dropbox requires the connecting app to receive data on the running computer localhost, and thsi is only allowed for UWP apps by adding an uap extension to the app manifest. I have tried using the 'skeletal' documentation given by Microsoft, but nothing seems to work. Using the example from the documentation my current code in the manifest is: <uap:Extension Category="windows.loopbackAccessRules"> <uap:LoopbackAccessRules> <!-- Child elements --> uap:Rule Direction = "in" </uap:LoopbackAccessRules> </uap:Extension> This fails the uap:Extension as having an invalid category. Can anybody help? An example of successfully allowing a store app to receive data on localhost?

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Nico Zhu (Shanghai Wicresoft Co,.Ltd.) 12,866 Reputation points
    2021-02-22T05:38:57.803+00:00

    Hello @Paul Mariotti Welcome to Microsoft Q&A,

    Loopback is not supported for UWP apps by default, you need make some configuration first. It is pointed in this document.

    Add the privateNetworkClientServer capability.

    Specific the uap4:LoopbackAccessRules extension.

    For the detail about uap4:LoopbackAccessRule please refer rob's reply here.

    Use the CheckNetIsolation tool for unpackaged apps.


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Paul Mariotti 11 Reputation points
    2021-02-22T07:57:56.517+00:00

    Hello.
    My app manifest already includes both the privateNetworkClientServer capability AND the uap4 declarations (manifest attached) and the app is listed as exempt from LoopbackNetworkIsolation by CheckNetIsolation (screen shot included, the app is the last entry).
    However, this has no effect on the result, the listener I have started does not receive anything.
    This is a problem since the Dropbox OAuth2 approval process requires access to the computer running the app the first time the Dropbox api is used in order to enable the app to retrieve the security token.
    I have tried everything, and in the meantime I have app customers complaining that solving this problem is taking too long.
    Please let me know how to make this work, or give me a workaround!

    70571-code.txt70546-screenshot.jpg70547-packageappxmanifest.xml


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.