locked
WebView control: Receives "CannotConnect" error message while navigating to some secured URL's

    Question

  • I am developing a windows 8.1 store app. I am using the webview control in my app to allow users to navigate to some pages which are secured ones. I used webview.navigate(uri) for this purpose. Webview navigates successfully for public pages but for secured pages like https://go.microsoft.com/?linkid=9843570 it fails. I get "CannotConnect" message in the navigationCompleted handler.

    This same url works fine when attempted using Internet Explorer app. 

    But when I ran fiddler and added its(fiddler's) certificate to Trusted root, the WebView in my App successfully navigated to the mentioned url. Otherwise when the fiddler is not running, I get same error i.e. "CannotConnect" in the navigationCompletedhandler of the control.
    I even checked by setting various capabilities in AppManifest like "Enterprise Authentication", "Internet", "Internet(Client & Server)" but didn't get any resolution. 

    Here is the queue of navigation done by the webview control while fetching the url

    1. https://go.microsoft.com/?linkid=9843570
    2. http://www.microsoft.com/itacademy/members
    3. https://www.microsoft.com/en-us/itacademy/members
    4. https://www.microsoft.com/en-us/itacademy/members/
    5. https://corp.sts.microsoft.com/adfs/ls/?wa=wsignin1.0&wtrealm=https%3a%2f%2fwww.microsoft.com......
    6. Navigation to https://go.microsoft.com/?linkid=9843570 fails with error code CannotConnect

    When I set the "Private Networks(Client & Server)" along with "Internet(Client & Server)" capability I get WebErrorStatus as "Unknown" instead of "CannotConnect" and the navigation failed handler gets invoked.

    Please suggest what could be the missing step because of which its failing. My app is almost in the deployment stage.

    --Swapnil

    Wednesday, April 23, 2014 6:10 AM

Answers

  • It's probable that this is related to the internal certificates that the Microsoft corpnet is issuing for access via ADFS.  My recommendation is that you contact internal resources to ask about this problem.  Ping me directly and I will point you in the right direction.

    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.

    Wednesday, April 23, 2014 12:30 PM
    Moderator