locked
Invalid URI: The format of the URI could not be determined RRS feed

  • Question

  • Hello, I am working on Windows 8 Application. I got struck with some minor issue. Can you please clarify:

    I am using Launcher class to launch Uri in external link. if my URI string prefix with "http://" or "https://" - I am able to launch URL successfully from external link.

    If my URI string contains only (say) "www.google.com" - App is throwing Invalid URI: The format of the URI could not be determined. 

    So having http: or https: prefix is mandatory for Uri class?

    Thanks



    Vamsidhar M

    Friday, November 22, 2013 11:17 AM

Answers

  • yes including the http or https is mandatory.  
    • Marked as answer by Anne Jing Thursday, November 28, 2013 7:47 AM
    Friday, November 22, 2013 1:20 PM
  • Hello Vamsidar M, 

    try this :

    string launchuri = "https://www.google.com"; var success = await Launcher.LaunchUriAsync(new Uri(launchuri)); if (success) {

    //launch uri successfully }


    • Edited by Khant Nipun Saturday, November 23, 2013 4:37 AM
    • Proposed as answer by Dave SmitsMVP Saturday, November 23, 2013 2:20 PM
    • Marked as answer by Anne Jing Thursday, November 28, 2013 7:47 AM
    Saturday, November 23, 2013 4:37 AM

All replies

  • yes including the http or https is mandatory.  
    • Marked as answer by Anne Jing Thursday, November 28, 2013 7:47 AM
    Friday, November 22, 2013 1:20 PM
  • Hello Vamsidar M, 

    try this :

    string launchuri = "https://www.google.com"; var success = await Launcher.LaunchUriAsync(new Uri(launchuri)); if (success) {

    //launch uri successfully }


    • Edited by Khant Nipun Saturday, November 23, 2013 4:37 AM
    • Proposed as answer by Dave SmitsMVP Saturday, November 23, 2013 2:20 PM
    • Marked as answer by Anne Jing Thursday, November 28, 2013 7:47 AM
    Saturday, November 23, 2013 4:37 AM