>>What if I use a really pathetic bittorrent style approach and have a WCF method that takes large files in chunks via repeated method calls and reassembles them >>on the server side. The basic code would be simple, but before I write something weird like that I thought I'd run it up the forum's flagpole first.
I have used chunked WCF file transfers if you want an endorsement for this approach (even if its pathetic which it probably is). But possibly not as sophisticated as your approach. I don't use a timeout lease (maybe I should). My files are not that large however but are of indeterminate size I am moving files from a server to a client so the requirements are fairly simple. I am also considering moving files from client to the server (use FTP at present for this), so I would be interested in what you do. I am also using BasicHTTPBinding as I was considering allowing non .NET applications to consume the service, and this limits what one can do. Regards Peter Maddin Applications Development Officer PathWest Laboratory Medicine WA Phone : +618 6396 4285 Mobile: 0423 540 825 E-Mail : petermad...@iinet.net.au; peter.mad...@health.wa.gov.au The contents of this e-mail transmission outside of the WAGHS network are intended solely for the named recipient's), may be confidential, and may be privileged or otherwise protected from disclosure in the public interest. The use, reproduction, disclosure or distribution of the contents of this e-mail transmission by any person other than the named recipient(s) is prohibited. If you are not a named recipient please notify the sender immediately. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Greg Keogh Sent: Wednesday, 28 September 2011 5:44 AM To: 'ozDotNet' Subject: SL4 and WCF large file transfer Folks, yesterday after much reading and some experiments I discovered the hard way that I cannot transfer large byte blobs using streams. I'm told the size might reach about 20MB. My SAMS WCF book and some samples show how you return a Stream and write in chunks. However (I think?!) that cannot be done with a Silverlight client, and I found that the proxy generator converts the Stream into a byte[]. I could use sockets, but my WCF service would have to be enhanced to have a listener running in a thread. I don't want to make architectural changes like this if I can avoid it. What if I use a really pathetic bittorrent style approach and have a WCF method that takes large files in chunks via repeated method calls and reassembles them on the server side. The basic code would be simple, but before I write something weird like that I thought I'd run it up the forum's flagpole first. I would need a little bit of infrastructure on the server side to maintain a collection of incoming "torrents" and add the chunks to each one until it's complete. I'd also need a simple timeout lease to allow me discard an unfinished "torrent" if the client dies or leaves. I could probably knock the whole thing up in a couple of hours, but should I? Greg