locked
[Windows Phone] WebBrowser navigates to ms-appx-web RRS feed

  • Question

  • Hello,

    I'm developing a Windows Phone 8.1 Silverlight project. It hosts a WebBrowser. A page the webbrowser navigates to contains JavaScript code redirecting to "ms-appx-web:///xxxx.html".

    Looks like WebBrowser doesn't like the "ms-appx-web" scheme. Message "You need to install an app for this task..." was showing.

    Any idea on how to deal with the "ms-apps-web" scheme?

    Thanks a lot!


    • Edited by encoderuser Thursday, November 3, 2016 11:24 PM
    Thursday, November 3, 2016 11:23 PM

Answers

  • Hi,

    You can refer to Silverlight WindowsPhone in this article.

    For example, we can use

    WebBrowserName.Navigate(new Uri("LocalHTMLPage.html", UriKind.Relative));   

    Here UriKind.Relative means this is a relative uri.

    There are three ways in this article and you can choose either one of them.

    I have tested it and it works Ok.

    Best Regards,

    Neal Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, November 8, 2016 8:45 AM

All replies

  • Hi encoderuser,

    "Windows Phone tries to open that link with a native app. If you don't have an app that knows how to handle that protocol, it launches a search on the Store to find an app that does".

    And you can have a try by setting

    e.Cancel=true;

    in your Navigating event. For more information, you can refer to what @Olivier said in this thread.

    Best Regards,

    Neal Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, November 4, 2016 11:24 AM
  • Thanks Neal.

    I checked that thread before, however "e.Cancel = true" is not the solution. My app need to retrieve info from the "ms-apps-web:///xxx.html" page.

    Any other ideas?

    Many thanks!

     

    Friday, November 4, 2016 4:16 PM
  • Hi,

    You can refer to Silverlight WindowsPhone in this article.

    For example, we can use

    WebBrowserName.Navigate(new Uri("LocalHTMLPage.html", UriKind.Relative));   

    Here UriKind.Relative means this is a relative uri.

    There are three ways in this article and you can choose either one of them.

    I have tested it and it works Ok.

    Best Regards,

    Neal Wang


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Tuesday, November 8, 2016 8:45 AM