Hosting a WCF web service in iPad (MonoTouch)
MonoTouch related now;
I'd like to turn my iPad into a host for WCF web services. I have already an .NET implementation of such that runs on Mac (Mono). That solution uses classes System.ServiceModel.ServiceHost and System.ServiceModel.Web.WebServiceHost. However these classes are not to be found with iPad project, even if I've referenced both System.ServiceModel and System.ServiceModel.Web;
Are these classe开发者_如何转开发s just not implemented on monotouch?
PS: I know how to turn iPad into a web server with System.Net.HttpListener class, but that's not what I'd like to accomplish now.
Seems it only works for WebScriptServiceHostFactory-based factories, by reading over this set of patches: http://lists.ximian.com/pipermail/mono-patches/2009-October/159496.html.
Looking at current sources we can see that ServiceHost is filtered out for mobile platforms ( https://github.com/mono/mono/blob/master/mcs/class/System.ServiceModel/moonlight_raw_System.ServiceModel.dll.sources ) probably so that it matches what is available in Silverlight, which has purposefully limited hosting capacities.
So adjust your code to use what is available, or put a request (probably will be denied) to make MonoTouch/MonoDroid have more of the WCF Stack available.
精彩评论