Examples:
- There is a streaming example in the "Windows Communication Foundation (WCF) and Windows CardSpace Samples" that can be found here: [Extraction Directory]\ TechnologySamples\ Basic\ Contract\ Service\ Stream. Help for this example can be found at the .NET Framework Developer Center here: Example help
- There is a chunking channel example in the "Windows Communication Foundation (WCF) and Windows CardSpace Samples" that can be found here: [Extraction Directory]\ TechnologySamples\ Extensibility\ Channels\ ChunkingChannel. Help for this example can be found at the .NET Framework Developer Center here: Example help
- There is a streaming over https example in the "Windows Communication Foundation (WCF) and Windows CardSpace Samples" that can be found here: [Extraction Directory]\ C:\Temp\TechnologySamples\Extensibility\Binding\WSStreamedHttpBinding. Help for this example can be found at the.NET Framework Developer Center here: Example help
WCF gotchas:
- Don't forget to set the maxReceivedMessageSize attribute of your binding to something fairly high if you are sending large files.
IIS gotchas:
- Increase the maxRequestLength, which represents maximum length in kilobytes, in the System.Web section of my web.config file in order to upload large files to your server (i.e., < maxrequestlength="65536"> ). Remember that the reason maxRequestLength in the System.Web section was set so low was to decrease your vulnerability to denial-of-service attacks.
Articles worth reading:
- Kjell-Sverre Jerijærvi: "WCF Streaming: Upload files over HTTP".
- MSDN: Service Contract: Stream
- MSDN: How to: Enable Streaming
- MSDN: Large Data and Streaming