Part 35 Sending large messages in WCF using MTOM

Published on November 22, 2017

Link for code samples used in the demo

Link for all dot net and sql server video tutorial playlists

In this video we will discuss, sending large binary messages in WCF using MTOM for better performance.

The default message encoding mechanism in WCF is Text, which base64 encodes data. This has the following 2 disadvantages
1. Base64 encoding bloats the message size by approximately 33%.
2. Involves additional processing overhead to base64 encode and decode.

The preferred approach to send large binary messages in WCF is to use MTOM message encoding. MTOM is an interoperable standard and stands for Message Transmission Optimization Mechanism. MTOM does not base64 encode data. This also means, the additional processing overhead to base64 encode and decode data is removed. Hence, MTOM can significantly improve the overall message transfer performance.

With Text Message encoding, the binary data is base64 encoded and it is embedded in the SOAP envelop. With MTOM, binary data is included as a MIME (Multipurpose Internet Mail Extensions) attachment.

Enjoyed this video?
"No Thanks. Please Close This Box!"