views:

263

answers:

1

Hello - I've been trying to figure out how to consume a self hosted WCF service from a Windows CE device. I've not found any good resources that walk through this process online. I've found some good samples for self hosting, and that part seems to be working fine, but not sure how to go about consuming on the compact framework.

In the past I was able to use NetCFSvcUtil.exe, but this doesn't seem to work with a self hosted service. NetCFSvcutil says:

The underlying connection was closed: An unexpected error occurred on a receive.

Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.

I've used Jason Henderson's sample http://www.codeproject.com/KB/WCF/WCFexample.aspx to get started with self hosting and that part works as expected.

Can any one point me to a sample where a compact framework client is used to consume a self hosted WCF service? or give a brief explanation of how I create the plumbing on the compact framework side?

For the host application I'm using a WinForm .Net 3.5 project and for the client a WinForm Compact Framework 3.5 project.

Thanks!

+1  A: 

This article might be a good start. It discusses creating a simple WCF service and then interacting with it from a CF application.

ctacke
Perfect example Chris, thanks! I had actually downloaded your sample code back in December, but it had been so long I had forgot about it.
pitprog
Heck, sometime even *I* forget about stuff I've written. Even if I don't forget, I still have to use a search engine to find it.
ctacke