I am getting random webservice timeouts and I can't figure out why, it is only happening when calling the webservice from the Xamarin app. If I test the webservice in SoapUI, and even spam it with requests, I get 100% success and return values. But when calling the same webservice in Xamarin about 30% of the calls never return and eventually timeout. But on the backend I and see the calls 100% of the calls made it to the webservice and worked, but Xamarin isn't getting the response 30% of the time.
Webservice is C# asmx webservice, which is added via the connected services in the Xamarin project.
The call is pretty simple
PhoneWSServiceReference.PhoneWebServiceSoapClient wsclient = new PhoneWebServiceSoapClient(EndPointName); WSHelper.SetWSTimeOut(ref wsclient, 20); BaseResponse response = wsclient.UserLogin(UserName, Password);
But 30% of the time I get "System.TimeoutException: 'The operation has timed out.'"
I am using the IsBusy flag, setting it to true just before the webservice call and false after it. Is there a better way to call the asmx webservices?