locked
ms-local-stream:// asking to add rule in app content uri for window.external.notify windows 8.1

    Question

  • I have a webview which loads page from appdata:// local folder.

    when I try to do window.exteranal.notify its showing error in javascript console.

    DOM7010: Unable to receive a ScriptNotify event from: 'ms-local-stream://b156e518-4750-453f-8150-4b10ca092dd7_local_636f6e74656e74/sco.html'. The website attempted to send a ScriptNotify event to the app from a WebView URI that is not included in the ApplicationContentUriRules for this app. To permit this event, add the URI to the ApplicationContentUriRules section of the package manifest. (In Visual Studio, add this URI to the Content URIs tab of the Manifest Designer.)
    File: sco.html

    is it allowed ?? as ms-local-stream is not valid uri to add in Manifest content URI's ..

    Thursday, June 05, 2014 10:51 AM

Answers

All replies

  • AFAIK, it's supposed to work. Can you provide a sample app for me to test?

    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Thursday, June 05, 2014 7:12 PM
    Moderator
  • Hi Matt,

    where can I upload my sample app so that you can check?

    Friday, June 06, 2014 4:57 AM
  • Hi Matt,

    https://skydrive.live.com/redir?resid=C224A7B3CE31207A!133 try this sample app.

    you will need to copy two files from content folder of app project into local app data folder.

    sco.html scofun.js file names.

    Thanks,

    Chintan

    Monday, June 09, 2014 7:29 AM
  • The problem is that your content is using ms-appdata URI:

    $("#wv_direct").get(0).navigate("ms-appdata:///local/content/sco.html");

    ms-appdata does not support scriptnotify:
    http://social.msdn.microsoft.com/Forums/en-US/7a5caded-3d6f-4ff2-91c3-746dd03ca8eb/webview-scriptnotify-from-msappdata?forum=w81prevwCsharp


    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.

    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined objects and unknown namespaces.

    Monday, June 09, 2014 3:45 PM
    Moderator