Hi,
Xamarin.Forms
I have created one application in Xamarin.Forms.
I can able to request WCF service with HTTP protocol and get the response. But I was not able to request wcf service with HTTPS protocol and we got an error "There was no endpoint listening at {0} that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.".
I am using below snippet in my application.
HTTP request snippet:
var binding = new BasicHttpBinding()
{
Name = "basicHttpBinding",
MaxReceivedMessageSize = 67108864,
};
var timeout = new TimeSpan(0, 1, 0);
binding.SendTimeout = timeout;
binding.OpenTimeout = timeout;
binding.ReceiveTimeout = timeout;
MobileOperationClient client = new MobileOperationClient(binding, new EndpointAddress("https://{Url}/MobileOperation.svc"));
HTTPS request snippet:
var binding = new BasicHttpBinding()
{
Name = "basicHttpBinding",
MaxReceivedMessageSize = 67108864,
};
var timeout = new TimeSpan(0, 1, 0);
binding.SendTimeout = timeout;
binding.OpenTimeout = timeout;
binding.ReceiveTimeout = timeout;
binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
MobileOperationClient client = new MobileOperationClient(binding, new EndpointAddress("https://{Url}/MobileOperation.svc"));
How can I make it work both http and https WCF service request from Xamarin.Forms?
Thanks,