views:

19

answers:

1

Hi, Im doing this project where i need to download files through a webservice (images, videos). The download MUST go through an existing webservice. The existing webservice was made when there were no need to upload and download files but the project has changed and now we need to do It through a webservice.

Right now I have implemented the download as a method that returns a byte[], I open a streamreader and resds the entire file into a byte[] and returns it to my method. This is working file on small files <~1Mb, above it takes too long time. I want to show some progress (e.g. when the user downlaods a 20Mb video) which i cannot do right now. And i want to make it download much faster (is a strategy to use multithreading and several threads that downloads a part of the file?). It is within a WPF application i need to do this.

Any ideas on how to approach this?

A: 

You can't do what you want to do using old ASMX web services. They will buffer the input internally, several times.

You need a way to move to WCF, at least for this new function. You can keep the old code, but you need a new, WCF service to properly handle the new.

John Saunders
How does this particular technique differ from asmx in wcf? How do you mean "buffer the input internally several times"?
H4mm3rHead
Thanks for pointing me in the right direction, found this one: http://www.codeproject.com/KB/WCF/WCF_FileTransfer_Progress.aspx that guided me further.
H4mm3rHead