0

I would like to transfer large files over a wcf program. I found this project and it works as I want it to but transfering large files is impossible. Does anyone know how to convert it from buffered to chucked???

This is the binding:

<binding name ="FileTransferServicesBinding"
transferMode="Streamed"
messageEncoding="Mtom"
maxReceivedMessageSize="10067108864" >

g90
  • 3
  • 5

1 Answers1

0

The project you have linked is already Streaming, we really need more information about particular errors you are receiving. What happens when you attempt to transfer a large file? How large of a file are you talking about?

With that in mind, your issue likely is in that the linked project neglects to specify that there are more binding settings around file size than maxReceivedMessageSize. The binding configuration also can include the nested element readerQuotas

<readerQuotas 
    maxArrayLength="Integer"
    maxBytesPerRead="Integer"
    maxDepth="Integer"
    maxNameTableCharCount="Integer"
    maxStringContentLength=="Integer" />

Which defines limits on what constitutes an acceptable message. The default values can be on the low side, e.g. maxArrayLength is 16384. Are you using a byte[] array? Is it larger than 16384?

Laurence Adams
  • 366
  • 1
  • 6
  • I managed to send a file of 120Mb but at 240Mb my app crashed. byte[]array is `int chunkSize = 65000; //2048; byte[] buffer = new byte[chunkSize];` – g90 Feb 25 '15 at 07:48
  • @g90 It's exceedingly difficult to diagnose the issue with so little information to go on. I would be happy to help further if you could update the original question with more detailed information about the crash, especially the exception/error you are receiving. – Laurence Adams Feb 25 '15 at 14:22