English 中文(简体)
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.





相关问题
How would you refactor this bit of code?

This bit of code runs on Windows Compact Framework and what it does is obvious. It looks as it should be refactored (especially considering that I may want to add cmd.ExecuteResultSet() later), but I ...

Using maps on Windows Mobile

I m experimenting with maps on different mobile platforms. Getting Google Maps to work on Android was easy, following this tutorial. Getting the same to work on Windows Mobile is a different matter. ...

Upload file to server in Windows mobile C# project

We have a setup of server and windows mobile device as a client. In server CSI script ready to accept single file from client. In Desktop we have use WebClient.UploadFile method to upload file to ...

Custom listview control for windows mobile in c#

I need to develop a custom listview control (ie, i need two labels and a progress bar in each list item) . I am new to windows mobile so please help me with code samples.

sending USSD in C#?

I want to write a simple c# application runs on windows mobile 6 which can send USSD messages Is there any library that could help me in doing this?? or is there any examples that explains how to ...

Do mobile phones have a Server : Port Scheme ?

I am new to mobile phone programming, find networking very interesting, and have this question: Does a phone running Windows Mobile or other OS s have Server:Port scheme, and what are the ports? ...

compact framework 2.0 detecting enter key in a textbox

I am developing a small app for a Motorola 9090-G using .net compact framework 2.0. My problem is that I can t seem to detect an enter keypress in a textbox. How do you detect an enter keypress in a ...

热门标签