File upload has become a common and desired functionality for any web application/service as well as the libraries on which they are built. WCF is no exception. Until Version 4.0, WCF provided only the buffered mode for uploading the file. From Version 4.0 onwards, WCF started to provide the streaming mode. In the buffered mode, the entire file needs to be uploaded to the server before the WCF service can access it. In the streaming mode, the service can access the file before it is completely uploaded. The streamed mode is very useful when you need the service to process files of large sizes that cannot be buffered.
In this recipe, we will see how to implement and configure a service that can be used to upload files using the streaming mode.