Forum Xamarin.Android

Unable to connect to a Web Service in Xamarin.Android(C#)

AnonymousUserAnonymousUser USMember ✭✭✭
edited November 2017 in Xamarin.Android

I've added the webreference in the Xamarin.Android App, then I instantiate it in the code like that:

WebReference.WebServiceEmp service = new WebReference.WebServiceEmp();
var data = service.HelloWorld();
But it throws:

System.Net.WebException: Error: ConnectFailure (Connection timed out)
When I add the service reference in Console Application instantiateing it like that:

service= new ServiceReference1.WebServiceEmpSoapClient();
DataTable data = service.Add();
It works fine. Why it doesn't work in Xamarin Android app? (I added the reference url like that: http://(myIp):8092/WebServiceEmp.asmx)

Best Answer


Sign In or Register to comment.