stream - How to show feedback while streaming large files with WCF -


i'm sending large files on wcf , i'm using transfermode="streamed" in order working, , working fine.

the thing files big, , want give client sort of feedback progress.

does have godd solution/idea on how acomplish this?

edit: don't command read of file in either side (client or server) if did give feedback on read function of stream.

edit2: part of code others understand problem

here's contract

    [operationcontract]     filetransfer update(filetransfer request); 

and here's definition of filetransfer

[system.servicemodel.messagecontractattribute(wrappername = "filetransfer", wrappernamespace = "http://tempuri.org/", iswrapped = true)] public class filetransfer : idisposable {     [system.servicemodel.messagebodymemberattribute(namespace = "dummy", order = 0)]     public stream filebytestream;      public void dispose()     {         if (filebytestream != null)         {             filebytestream.close();             filebytestream = null;         }     }  } 

so, in service (hosted on iis) have this:

request.filebytestream; 

and wcf reads stream, right?

i hope helps people out understand problem... please let me know if need further info

what adding total stream size custom soap header (use messagecontracts). can process stream on client in chunks (like reading buffer of defined size in loop) , each chunk can notify client processed increment in context of expected size.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -