This project is read-only.

Sending big files by WCF Service to ASP.NET or WinForms application


For example, send big file (more than 500MB like PDF file, or big JPG files) by WCF Service to a ASPNET application and too for WinForms application.
Have this architecture:
WebSite ASP.NET <------> WCF Service <--------> DataBase
WinForms application <------> WCF Service <--------> DataBase
DAtabase gathering very big files.
User request a big file in aspx page, through WCF Service. Service call database, and get the big file.
Now, my entity (datacontract) has those fields:
string Data1
string Data2
string Data3
byte[] FileBigger
How to send big file throught WCF Service to Website ?
How to send big file throught WCF Service to winForms ?
which best practices for do it ?
Very good sample is required.

file attachments


MariusVanBelkum wrote Feb 7, 2011 at 10:30 AM

Hi There,

I have create a small applications that uses a webservice that allows you to stream a file to or from the web service.

Streaming is enabled on the web service. Here is 2 links if you would want read up on it:

Marius van Belkum

wrote Feb 7, 2011 at 11:02 AM

wrote Jun 9, 2011 at 7:51 AM

wrote Aug 29, 2011 at 2:48 AM

mapeng wrote Aug 31, 2012 at 5:20 AM

Hello alhambraeidos,

Thank you for using our free Microsoft All-In-One Code Framework Sample Request Service!

Your sample request is about how to use the WCF Service to send the big Files. If I misunderstood your requirement, please feel free to let me know.

You can refer the MariusVanBelkum’s link, and if you want the sample, you can refer the following link:
This sample demonstrates how to use WCF Data Services to implement an OData service that uses a streaming provider to store and retrieve image files.

Please let us know if this sample is helpful to you.

Thanks and have a great day!

Microsoft All-In-One Code Framework
Feedback address:

wrote Aug 31, 2012 at 7:10 AM

wrote Feb 22, 2013 at 3:00 AM