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.
We just finished a brand new project using WCF instead of ASMX Web Services for the first time. We are VERY happy with the results, but do know that there was a steep learning curve. Even so, we are extremely pleased with the overall results and know that this is the basis for everything Microsoft is doing going forward and it has been totally worth the pain--warts and all.
Quick benefits WE gained OVER ASMX:
1) For internal (behind firewall) service-to-service calls we use the net:tcp binding, which is much faster than SOAP
2) We enabled both a net:tcp endpoint and a "web" endpoint on the same service with only a configuration file update (no code changes)
3) We were able to create AJAX-supporting RESTful web services with only configuration changes and using the DataContractJsonSerializer that's already built in. To do this otherwise, we would have had to write an HTTP Handler (ashx) and handle most of the Json serialization and url parsing by hand.
4) As our site needs to scale for performance optimization and stability, we are looking at converting to using an MSMQ-based messaging structure that is asynchronous AND guaranteed and participates in transactions; WCF provides an MSMQ bindng that requires little-to-no code change in our services--just reference updates and setting up MSMQ properly with the existing services (and adding attributes for Transactional boundaries).
BUT BE WARNED: Really invest in learning this (buy the blue O-Reily book and go through it). There are things like argument-name-changes during development that actually don't break the service references but result in null arguments being passed (built-in version skew handling), hosting models to consider (Windows Service vs. IIS), and instantiation models and FaultExceptions to all REALLY understand. We didn't going in and we had some pains. But we plowed ahead and are VERY happy with our learnings and the flexibility and growth opportunities we have not being tied to ASMX anymore!
Best Answer
Just realized I used my wrong reply (yes I have a collection of these for work)
anyhow, google 'NetCFSvcUtil' if you are running windows 7 then you need the newer version - Updated NetCFSvcUtil
Basically you are going to use this utility to crate a proxy for you.
Rather long winded post but this will get you started :)
Google these things then, download and install :
Running Vista or greater ? : Windows Mobile Device Center 6.1 Driver for Windows Vista Otherwise : Active Sync (methinks the latest verson is 4.5)
Windows Mobile SDK's - Windows Mobile 6 Standard SDK Refresh - Windows Mobile 6 Professional SDK Refresh
Windows Mobile Emulator Images - Windows Mobile 6.1 Standard Images (USA) - Windows Mobile 6.1 Professional Images (USA)
Configure Active Sync (WMDC) Start Windows Mobile Device Center Hover ‘Mobile Device Settings’ -> Select ‘Connection Settings’ Set following options : - Allow USB Connections : true - Allow Connections to one of the following : DMA - This Computer connects to : Automatic - Allow Automattic Device Authentication : true - Allow data connections on this device when connected to the pc : true
Configure Emulator Start Visual Studio Device Manager (create a shortcut from C:\Program Files\Microsoft Device Emulator\1.0\dvcemumanager.exe) Right Click on an entry and press ‘Connect’ to start the emulator image Once the Emulator has started, Right Click on the same emulator image and press ‘Cradle’ (this establishes the active sync partnership). If this is the first time you have partnered this particular emulator image WMDC will prompt for you to setup a partnership, you need to do this. You don’t need to synchronize anything (in fact I recommend you don’t) but you still need to go through the process.
Setup Network Access Start \ Settings \ [Connections] \ Connections \ [Advanced] \ Select Networks Both options should be set to be ‘My ISP’
Create a Device Project Start Visual Studio File \ New \ Project : Smart Device \ Smart Device Project - follow the wizard.