• 0

WCF transferring large files netTcp vs MTOM


Question

So in WCF, MTOM provides less overhead for large binary chunks when sending them to the service. However netTcp binds directly and streams nothing but binary apparently from what I have read. So which is better for transferring large files? It would seem that netTcp would be better?

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I appreciate the reply! :) I shold have phrased the question  better. MTOM is able to be used with wsHttpBinding as well as netTcpBinding. I don't understand why you would use MTOM when netTcpBinding only streams binary anyway from what I have gathered. I must be missing something.

Link to comment
Share on other sites

  • 0

This should answer your question: http://forums.asp.net/t/1864812.aspx?netTcpBinding+puts+the+binary+encoded+message+within+SOAP+envelope+

 

Basically, the data is transferred in a soap envelope in unencoded binary format per default with netTcpBinding. If you drop it into MTOM encoding, then it would optimize it the same as if you pushed it using the wsHttpBinding with MTOM encoding (basically some sort of compressed binary format). You could further push unencoded binary via the wsHttpBinding if you wanted to just like the netTcpBinding does per default. So if you ignore the protocol differences, the only difference from an encoding standpoint is that wsHttpBinding can also do text encoding; where as, netTcpBinding cannot.

 

Note: I have no background in the particulars here, but I'm reasonably sure this it correct.

Link to comment
Share on other sites

  • 0

Thanks for the replies so far guys :) going to bed. I'll check back tomorrow to see if anyone else elaborates, but so far all have been helpful!

Link to comment
Share on other sites

This topic is now closed to further replies.