views:

88

answers:

2

I Have this architecture:

WebSite ASP.NET <------> 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 ? which best practices for do it ?

+1  A: 

Check this out.

gooch
any good sample code source or any sample application ?
alhambraeidos
+2  A: 

I would recommend this article from MSDN:

Large Data and Streaming

When you have a large amount of data to transfer, the streaming transfer mode in WCF is a feasible alternative to the default behavior of buffering and processing messages in memory in their entirety.

Sample Code from MSDN.

The Stream sample demonstrates the use of streaming transfer mode communication. The service exposes several operations that send and receive streams.

Kelsey