Using Silverlight 3 to build a file upload app. It can upload files of just about any size - it works (depending on circumstance) with 4GB files. It uploads chunks of the files, so that if anything happens, the upload can be resumed from the most recent chunk.
The circumstance where uploading does not work is in IE and Chrome when uploading large files. They seem to have memory issues. In Firefox, the memory usage is a jagged line - as would be expected if it was reading a chunk of the file, uploading it, discarding it, then starting again on the next chunk. IE and Chrome seem to hold on to the chunks. Eventually an OutOfMemoryException is thrown once the available RAM is used up.
So far, I've tried changing the file stream and webrequest stream sizes, buffers, etc. I've tried just generating bytes rather than reading from the file stream - same issues. I've tried just writing a whole chunk at once rather than the 4kb buffer we use now - same issues.
Any ideas about what might be happening? Are IE and Chrome just not garbage collecting to get rid of the chunks that aren't needed? Or is there some http request header I should be using? Some ideas about how to pinpoint where the memory is used - in IE itself, or the Silverlight plugin?