I have a scenario that I need to implement. Namely, my server needs to implement WCF that would accept large files (500MB - 1GB) and support resuming in case the connection drops for any reason. I was thinking of using WCF streaming for this, but I was wondering if resuming is somehow supported out of the box or do I need to implement custom handling for this. What is the best course of action for in my case? Links to examples would be appreciated.
Windows Communication Foundation (WCF) can send messages using either buffered or streamed transfers. In the default buffered-transfer mode, a message must be completely delivered before a receiver can read it. In streaming transfer mode, the receiver can begin to process the message before it is completely delivered.
Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application.
A WCF client connects to a WCF service via an endpoint. Each service exposes its contract via one or more endpoints. An endpoint has an address (which is a URL specifying where the endpoint can be accessed) and binding properties that specify how the data will be transferred.
Upload and download methods should accept a parameter that controls the position of download/upload.
I am not sure this is implemented/supported out of the box. The WCF service must have a compatible client for this kind of approach.
Check this out for complete code.
http://www.abhisheksur.com/2010/09/progress-streamed-file-download-and.html
Other links you might find useful:
Chunking Channel
Introduction to Reliable Messaging with the Windows Communication Foundation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With