I encountered a strange behavior in the .Net SDK of your SDK (V6.0.1).
For describing this issue more detailed I have created two little demo apps, that nail down the issue.
First program is a .net console application, frequently asking a GET Rest and show that in the console what works brilliant.
Second program is a Xamarin.Forms iOS and Android app behaving really strange. The codebase is exactly the same than in the first program. The backend is behaving for the first 10 Rest-Calls as expected. But the next (11) call will run into following timeout error. I already did some more testing around, but it doesn’t matter which CRUD Operation you do, it’s always the 11th call that fails with the same error:
at System.Net.HttpWebRequest.RunWithTimeoutWorker[T] (System.Threading.Tasks.Task
1[TResult] workerTask, System.Int32 timeout, System.Action abort, System.Func
1[TResult] aborted, System.Threading.CancellationTokenSource cts) [0x000f8] in <079b3c6f37014c7f868f66c7f0ec79f9>:0
at System.Net.HttpWebRequest.EndGetRequestStream (System.IAsyncResult asyncResult) [0x00019] in /Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/mcs/class/System/System.Net/HttpWebRequest.cs:901
at Weborb.Client.HttpEngine.SetStreamDataCallback[T] (System.IAsyncResult asynchronousResult) [0x00020] in :0
You can simply reproduce this issue with creating a new Xamarin.forms solution from scratch, adding the latest Backendless .NET SDK to it and copy this code to the MainPage.cs
Simply add to the MainPage.xaml a button calling the Button_Clicked Event and hit this button more then 10 times.
public partial class MainPage : ContentPage
{
public static string APPLICATION_ID_DEV = "852EE6BB-B3FF-A610-FF25-F064DAE8E300";
public static string APIKEY_DEV = "CED5DBDF-AD89-403A-B53D-8615C4273D7F";
public MainPage()
{
InitializeComponent();
Backendless.InitApp(APPLICATION_ID_DEV, APIKEY_DEV);
}
async void Button_Clicked(System.Object sender, System.EventArgs e)
{
await GetPeople();
}
int i = 1;
async Task GetPeople()
{
try
{
var people = await BackendlessAPI.Backendless.Data.Of<Person>().FindAsync();
string output = $"RestCall #{i++}\n";
foreach (var person in people)
{
output += $"Name: {person.name}";
Console.WriteLine(output);
}
OutputLabel.Text = output;
}
catch (Exception ex)
{
Debug.WriteLine($"Error {ex.Message}"); throw ex;
}
}
}
class Person
{
public string objectId { get; set; }
public string name { get; set; }
}