Hello,
Is there a known issue with using WebClient over cellular networks? I have an app that's loading some content with WebClients, and everything seems to work fine on wi-fi. But, take the app out on 3G and it starts to have problems loading the content. It works most of the time, but about, say, one out of twenty times it instead returns with this error
{System.Net.WebException: Error getting response stream (ReadDone2): ReceiveFailure ---> System.Exception: at System.Net.WebConnection.ReadDone(IAsyncResult result) at System.Net.WebConnection.HandleError (WebExceptionStatus st, System.Exception e, System.String where) [0x0003a] in /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebConnection.cs:399 / --- End of inner exception stack trace --- at / --- System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) / --- [0x00065] in / --- /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:854 / --- / at System.Net.HttpWebRequest.GetResponse () [0x0000e] in / --- / /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/HttpWebRequest.cs:860 / --- / / at System.Net.WebClient.GetWebResponse (System.Net.WebRequest / --- / / request) [0x00000] in / --- / / /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebClient.cs:1473 / --- / / / at System.Net.WebClient.ReadAll (System.Net.WebRequest request, / --- / / / System.Object userToken) [0x00000] in / --- / / / /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebClient.cs:896 / --- / / / / at System.Net.WebClient.DownloadDataCore (System.Uri address, / --- / / / / System.Object userToken) [0x0000a] in / --- / / / / /Developer/MonoTouch/Source/mono/mcs/class/System/System.Net/WebClient.cs:256 / --- / / / / / }
This happens more or less immediately, so I can work around this by simply checking "if connecting-time < 0.5 sec { try again }", but I thought I'd see if someone else have had the same issue and/or a better solution?