Monotouch WCF (wshttpbinding) [英] Monotouch WCF (wshttpbinding)

查看:24
本文介绍了Monotouch WCF (wshttpbinding)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我没有发现关于单点触控的 wcf 支持.我需要使用用户身份验证为 iphone 创建 Web 服务.我想使用 wshttpbinding.

monotouch 是否支持 wcf wshttpbinding?如果没有,我如何通过身份验证、寡妇(C#)上的服务器端、iphone 上的客户端(单点触控)创建 Web 服务

非常感谢

解决方案

Mono 目前不支持 WSHttpBinding,正在开发中,支持非常参差不齐.

您可以使用基于 HTTPS 的纯 SOAP(来自 .NET 1.0 和 .NET 2.0 的网络服务堆栈).

但由于您刚刚开始,您不妨使用带有 JSon 或 XML 返回值的 REST 服务.许多人现在使用 Json 作为这种连接的通用语言,因为它具有额外的优势,您可以使用相同的桥来创建基于 HTML 的应用程序,因为 Json 输出可以直接输入浏览器上的 javascript.

对于服务器,你可以使用类似 ServiceStack 的东西:

http://www.servicestack.net

对于客户端,您可以使用 System.Json 手动解析 Json,这是一个非常低级的准系统堆栈,或者您可以使用 Newtonsoft 的 Json 解析器之类的东西,它带有完整的反序列化器和对象映射器.

I've found nothing about wcf support on monotouch. I need to create web service for iphone with user authentication. I'd like to use wshttpbinding.

Does monotouch support wcf wshttpbinding? If not, how can I create web service on with authentication, server side on widows (C#), client side on iphone (monotouch)

Many thanks

解决方案

Mono does not currently support WSHttpBinding, it is a work in progress, and the support is very spotty.

You can use plain SOAP over HTTPS (the web services stack from .NET 1.0 and .NET 2.0).

But since you are just getting started, you might as well use REST services with JSon or XML return values. Many folks are now using Json as the lingua-franca for this kind of connections, as it has the added advantage that you can use the same bridge to create HTML based apps as the Json output can be fed directly into your javascript on browsers.

For the server, you can use something like ServiceStack:

http://www.servicestack.net

For the client, you can either parse the Json manually using System.Json which is a very low-level and barebones stack, or you can use something like Newtonsoft's Json parser that comes with a full deserializer and object mapper.

这篇关于Monotouch WCF (wshttpbinding)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆