Reputation: 9629
I'm using Xamarin iOS and the silverlight 3 slsvcutil to generate WCF services for use in a mobile app. I then create a task based implementation using the Task.Factory.FromAsync so I can use async await against the service call. In making this call for a lengthy data transmission I'm getting a network timeout exception at 60 seconds even though the WCF binding is set to use 10 minutes, long, but safe. The code to create the Task is:
public Task<byte[]> SyncExAsyncT(int accountId, string accountUsername, byte[] syncData, System.DateTime lastSyncDateUtc, int appVersion, string deviceName, string misc, int modelVersion, string deviceToken)
{
return Task<byte[]>.Factory.FromAsync((callback, asyncState) =>
base.Channel.BeginSyncEx(accountId, accountUsername, syncData, lastSyncDateUtc, appVersion, deviceName, misc, modelVersion, deviceToken, callback, asyncState),
base.Channel.EndSyncEx, null);
}
I call the method as expected using byte[] responseStream = await client.SyncExAsyncT
How can I control the timeout of this implementation such that I can avoid the network timeout at 60 seconds?
Upvotes: 0
Views: 132
Reputation: 78
see also to these bugs:
https://bugzilla.xamarin.com/show_bug.cgi?id=25251
https://bugzilla.xamarin.com/show_bug.cgi?id=19697
https://bugzilla.xamarin.com/show_bug.cgi?id=18029
This issue is not fixed since months
Upvotes: 1