Search code examples
wcfvisual-studio-2015wcf-data-services

Invalid URI: The URI scheme is not valid when adding a service reference


To start with, I am a complete newbie when it comes to web services. What I eventually want to achieve is to create an Android/ios app with Xamarin that retrieves data from a remote MySQL database (send criteria and receive a list of names) and understand that web services is the way to go. I am working through the MS Getting Started Tutorial with Windows 10 and Visual Studio 2015 and have got so far that the WCF service is running. I can enter the url in a browser and get the CalculatorService service page ok. My problem comes creating the WCF client. I add a new console application to my solution and add a reference to System.ServiceModel. I now have to add a service reference. So, as per instruction, I started the host service and entered [See screen shot] in the Address bar and click the Go button. I then just get the error: Invalid URI: The URI scheme is not valid.

Can anyone please help me get a bit further?

Thanks,

Gerry

This is the error(the first image I forgot to start the service)


Solution

  • This issue is occurring because you're pasting an invalid URL into the Service Reference Address Bar.

    The URL to enter is just

    http://localhost:8000/ServiceModelSamples/Service

    Update the Address to just that, and click Go again.