简体   繁体   中英

Dealing with WCF in iPhone/iPad project

I'm trying to make my Monotouch app work with WCF service. Everything works fine but every now and then (10 - 30 service calls), app crashes with SIGIL. Debugger says just that. It happens on random places.

Another employee works on iPhone app which uses same service. Same problem, but more frequent.

Everything works great when testing on simulator.

If somebody's had same problem, please help. Would using asmx service help?

Thank you all.

Cheers

WCF is a bloated option on high traffic servers at the best of days, using SOAP in a mobile application is a enough of a waste of resources that it should be considered bad practice.

ServiceStack is a much leaner and faster option that also allows you to access your same web services with ServiceStack's strong-typed, code-gen-free Service Client's using .NET's fastest JSON and JSV Text serializers.

The MonoTouch versions of ServiceStack's service clients is available separately from: https://github.com/ServiceStack/ServiceStack/tree/master/release/latest/MonoTouch

And an example MonoTouch application that showing how to use is available here: https://github.com/ServiceStack/ServiceStack.Examples/tree/master/src/MonoTouch/RestFilesClient

Not much an answer, but I had a similar issue. Worked for a long time to get my desktop WCF client code running on MonoTouch, only to have the app die after 10 or so calls on SIGIL.

Symbolicating and analysing the crash reports showed the app dying somewhere in the WCF stack every time. However I could not distill the issue down into a trivial, reproducable example.

In the end I used the ServiceStack framework (http://www.servicestack.net/) to throw a simple XML REST endpoint in front of my service, and called it using simple WebClient requests and some helper methods to push my objects to/from XML (DataContractSerializer was too slow).

If you have access to the server side, this may be your simplest approach.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM