开发者

WCF hosting in .NET compact framework

I would like to host a service on a WinCE device. The WinCE device is the host which 开发者_运维技巧can be accessed(control and data acquisition) by multiple clients (PC or WinCE) over serial port, TCP, USB etc. I was considering using Protocol Buffers for serialization on the wire. It would be ideal to use WCF or remoting but as far as I see they are not implement on the Compact Framework. Anyone have any ideas how this can be achieved.


CF 3.5 has some WCF, but at current only the full-fat framework has WCF with the hooks to support swapping out the serializer on the fly. I know of some users who are using CF but passing a Stream over the wire (as far as WCF is concerned) and handling the protobuf-net (de)serialization outside of WCF (a byte[] may work similarly, but they chose Stream - I can't recall why- perhaps base-64 issues?). Would that help?


It's a blatant plug, I admit, but you might consider hosting a REST web service from the device.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜