Dino,

Always happy to test on my devices if you need a hand.

Regards,

James

On 08/10/2012, at 9:50 AM, Dean Cleaver <[email protected]>
wrote:

  I’m using the standard Visual Studio calls to the web client – so if I
have a method called “Fred” I call “service.Fred()”.I don’t use async, but
I do use my own threads so there’s no blocking.



I’ll look into the response property, but it’s a long slow fix – won’t be
till we publish to Apple again that I’ll start to get that information, and
can then look at fixing it. I can’t reproduce these errors, but they’re
happening to a few clients in the field.



Dino



*From:* Jason Hardman [mailto:[email protected]<[email protected]>]

*Sent:* Sunday, October 07, 2012 17:10
*To:* Dean Cleaver; [email protected]
*Subject:* RE: Any ideas what causes this?



How are you making the web calls?  It is your choice to use async or not.
Maybe you are using a library that is forcing it to use async?  If you are
there might be sync methods available.  I know RestSharp has sync and async
methods.  Personally I am using async so we can use the same code on
Windows Phone if we ever get that far.



The WebException has a Response property that you should be able to use to
determine the Url that was called.



*From:* Dean Cleaver [mailto:[email protected]]
*Sent:* Monday, 8 October 2012 10:21 a.m.
*To:* Jason Hardman; [email protected]
*Subject:* RE: Any ideas what causes this?



Yeah – I figured it was because of some Async calls, but I don’t use the
Async calls directly – so Mono? must be calling async?



And I have about 80 to 100 different web service calls – so I’m unsure
which ones to page. If there was any hint as to what part of my code was
causing the problem it would be useful, but I just have nothing to go on.



*From:* Jason Hardman [mailto:[email protected]]
*Sent:* Sunday, October 07, 2012 16:15
*To:* Dean Cleaver; [email protected]
*Subject:* RE: Any ideas what causes this?



The errors are to do with making calls to the web asynchronously i.e. the
error is occurring on a different thread to the code that started it, hence
your namespace is not displayed.



I have experienced the first error when the data being returned was large.
My fix was to change my WCF Web API to use paging and then update my
RestSharp code (in MonoTouch) to make the web calls while passing the
paging parameters.  RestSharp is a library that simplifies making web calls
to REST web services as it automatically serialises the data into objects.



*From:* [email protected]
[mailto:[email protected]] *On Behalf Of *Dean Cleaver
*Sent:* Monday, 8 October 2012 7:56 a.m.
*To:* [email protected]
*Subject:* Re: [MonoTouch] Any ideas what causes this?



And this one:



System.Net.WebException: Error: ConnectFailure (No route to host) --->
System.Net.Sockets.SocketException: No route to host
at System.Net.Sockets.Socket.Connect (System.Net.EndPoint remoteEP)
[0x00000] in :0
at System.Net.WebConnection.Connect (System.Net.HttpWebRequest request)
[0x00000] in :0
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetRequestStream (IAsyncResult asyncResult)
[0x00000] in :0
at System.Net.HttpWebRequest.GetRequestStream () [0x00000] in :0
at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke
(System.String method_name, System.Object[] parameters) [0x00000] in :0



Dino



*From:* Dean Cleaver
*Sent:* Sunday, October 07, 2012 13:48
*To:* Dean Cleaver; [email protected]
*Subject:* RE: Any ideas what causes this?



Likewise this one:



System.Net.WebException: The request timed out
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
[0x00000] in :0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in :0
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse
(System.Net.WebRequest request) [0x00000] in :0



Once again – none of my code nor namespaces at all. How does this happen?



Dino



*From:* [email protected]
[mailto:[email protected]] *On Behalf Of *Dean Cleaver
*Sent:* Sunday, October 07, 2012 13:47
*To:* [email protected]
*Subject:* [MonoTouch] Any ideas what causes this?



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) [0x00000] in :0
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult)
[0x00000] in :0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in :0
at System.Web.Services.Protocols.WebClientProtocol.GetWebResponse
(System.Net.WebRequest request) [0x00000] in :0



It must be being reported by this?



AppDomain
.CurrentDomain.UnhandledException +=
HandleAppDomainCurrentDomainUnhandledException;



Because none of the above is my code – there is no “Xception” nor
“KleverLogic” namespace in the call. And any ideas what could cause it?



Dino
_______________________________________________
MonoTouch mailing list
[email protected]
http://lists.ximian.com/mailman/listinfo/monotouch

Reply via email to