Forum Xamarin.Forms

Has anyone seen: "Argument EndpointAddress has unsupported URI scheme: http" ?

AaronBlyAaronBly USUniversity

Please provide information on how to resolve the current problem. Trying to call a WCF service I get the following error: Argument EndpointAddress has unsupported URI scheme: http.

The service is just a simple service that returns a greeting. I am using it to test my connection. This is for a project in Xamarin.Forms.

My Code:

`GeneralClient client = new GeneralClient(new BasicHttpBinding(), new EndpointAddress(new Uri("http://[service ip address]:8199/General.svc")));

        var binding = client.Endpoint.Binding as BasicHttpBinding;

#if __IOS__

        binding.ProxyAddress = new Uri("https://[proxy ip address]:8080");
        binding.UseDefaultWebProxy = false;
        binding.Security.Mode = BasicHttpSecurityMode.Transport;
        binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.Basic; // !!!
        binding.Security.Transport.ProxyCredentialType = HttpProxyCredentialType.Basic; // !!!
        if (client.ClientCredentials == null) return;
        client.ClientCredentials.UserName.UserName = username;
        client.ClientCredentials.UserName.Password = password;


        client.HandshakeCompleted += TestResult;

As you can see I finally got through my company's proxy with the above code but then when it tries to go to the service it gives the above error.

Has anyone experienced this and if so how did you get it resolved?




  • Are you testing on Android? Maybe you forgot to add the INTERNET permission in your manifest??

  • AaronBlyAaronBly USUniversity

    Right now I am just trying to get it to work on iOS. I get through the proxy but I think it expects the service to be https also and it isn't, it is http.

  • TonyDTonyD USMember ✭✭✭

    @AaronBly I think as of iOS 9 they're making it more difficult to use non-https version. If you have the latest Xamarin.iOS then I believe the change is in there as well.

    There seems to be an opt-out method here, not sure if that works:

    If you can, it's probably more reasonable to generate some ssl certificates though!

Sign In or Register to comment.