views:

2227

answers:

1

Hi all,

I have searched quite a bit and can't seem to find a good stable solution, so any help will be appreciated.

Here's the scenario: Windows Mobile device running client app on .NET CF 3.5 (OpenNETCF libraries being used) Web App on .NET 3.5 (Web server running IIS) Developing in VS2008, .NET 3.5 - all the latest

I need to use web services or WCF or MTOM to transfer large files to and from the mobile device. (Prefferably chunked). I've found some great articles, but can't seem to get it working right, normal web services with XML data gives out of memory exception, WCE is not available in VS2008, WCF on CF is not giving me the option to add "Service referrence", only "Web referrence", I'm at my wits' end.

Some say, don't use WSE, it is outdated, only use WCF but I can't get it running on the mobile app.

All I need is a simple up/down transfer mechanism from mobile device to web server, I can look at compression and reliablity later.

Can anyone please point me in the right direction with some articles and sample code?

Thanks in advance.

+1  A: 

In the past, I found that web services, WCF, MTOM and WSE provided terrible solutions for large file transfers. Particularly for uploading.

What I ended up doing was creating a client/server TCP connection and sending the file's binary data across the stream. I preceded the file data with a header and xml string which detailed the file data. In my case I required a level of security so I used the System.Net.Security.NegotiateStream. In your case, the TcpClient and TcpListener of the System.Net.Sockets namespace might suffice. They are both supported by CF 3.5.

Hope that helps.

CStick
Thanks for the info, I have decided to use web services to get the file lists and then use FTP (OpenNETCF.Net.Ftp), it seems as if streaming it is just going to cause too much problems.