none
Windows Store UWP: ApplicationContentUriRule with 'all' or 'allowForWebOnly'

    Question

  • My Windows 10 universal app is failing windows store certification and throwing me this error:

    "The Application cannot include an ApplicationContentUriRule with 'all' or 'allowForWebOnly' WindowsRuntimeAccess while any of the following capabilities are enabled: enterpriseAuthentication, sharedUserCertificates, musicLibrary, picturesLibrary, videosLibrary, removableStorage, documentLibrary, internetClientServer, privateNetworkClientServer."

    Totally have no idea what the issue is. Earlier this week I uploaded the same app and it passed certification. This is a cordova app and by default cordova adds this content uri rule:

    <uap:Rule Match="ms-appx-web:///" Type="include" WindowsRuntimeAccess="all" />

    Any help would be most appreciated!!

    Saturday, April 30, 2016 12:43 AM

All replies

  • Same for me here.. removing the rule from the manifest cause the app to stop working, giving an exception at startup (cause WinRT is no more accessible..).

    Could someone give a hint?

    Saturday, May 7, 2016 11:00 AM
  • I have the issue. I need access to the WinRT APIs so I can disable overscan and scaling for an Xbox app I'm developing, but when privateNetworkClientServer capability is enabled you can't apparently get access to the WinRT APIs.
    Tuesday, September 27, 2016 2:58 PM
  • What worked for my use case is to set the startup URL using Local Mode (i.e. not ms-appx-web:///), remove the content URI rule and then modifying the CSP settings in a <meta> tag in the index.html file.

    Something like this for your CSP rules might work (but it will depend on your own needs).

    <meta http-equiv="Content-Security-Policy" 
              content="default-src 'self' ms-appx: data: gap: blob: 'unsafe-inline' 'unsafe-eval'; ..." />

    I found this from this post:

    https://social.msdn.microsoft.com/Forums/en-US/fd28bcd5-b3a8-4307-be93-29fc4c5aaacd/uwpwork-around-for-application-content-uri-rule-windows-runtime-access?forum=wpdevelop

    **the reply is near the bottom (can't link directly to a reply unfortunately)

    AFTER FURTHER TESTING THIS DOES NOT WORK. THE CSP RULES I HAVE ARE BEING IGNORED FOR script-src.


    • Proposed as answer by NBotter Tuesday, September 27, 2016 3:32 PM
    • Unproposed as answer by NBotter Tuesday, October 4, 2016 3:50 AM
    • Edited by NBotter Tuesday, October 4, 2016 3:51 AM Added note about technique not working
    Tuesday, September 27, 2016 3:32 PM