Folks, I have a WCF service method like the following to receive an uploaded file from the SL4 client:
public int UpdateJob(int jobToken, string filename, byte[] buffer, string comment) This method is finally crashing because the byte[] is approaching 8MB and will continue to grow. I have to convert this method to use a stream and allow the client to see progress. I've been searching the web and reading for an hour and I can't find a clear example. Confusion #1 -- Some examples show the WCF service defined with bind transferMode="StreamedResponse" in the config file. My WCF service has dozens of methods, so how can I apply this attribute to one method and not the others? Do I have to have multiple bindings in my service? (that's getting messy) Confusion #2 -- If I do get a Stream from the service and write to it in chunks, how do I pass the extra arguments jobToken, filename and comment along with the bytes? Confusion #3 - Who reads and writes to the stream in chunks? I guess the service will create a writable stream to receive the bytes (a MemoryStream?) and pass it back to the client. The client will write chunks of a file into the stream. Does the service perform blocking reads from the stream in chunks? When the client closes the stream I presume the service will get zero bytes and know it's finished. The exact protocol of who reads and writes using which technique is unclear to me. Sorry to be so vague, but I just can't picture the whole process clearly in my head. Any clarification or pointers to nice example would be most welcome. I'll continue web searching in the meantime. Cheers, Greg
_______________________________________________ ozsilverlight mailing list [email protected] http://prdlxvm0001.codify.net/mailman/listinfo/ozsilverlight
