Search code examples
c#windows-store-appsipuri

Turning a IP Address into a valid URI


I have been trying to navigate my webview element in my windows store app to '192.168.0.1' but for some reason the Uri class can not parse it, is there a way to make convert a IP Address into a Uri?


Solution

  • The answer to this is to add the prefix of the ip's protocol:

    http:// or https://, for instance

    new Uri("192.168.0.1") would have to be new Uri("http://192.168.0.1/")

    Thanks to Bob Kaufman