You can partially solve this problem using MTOM (Message Transmission Optimization Mechanism) message encoding as well. The default message encoding mechanism in WCF is text that base64 encodes data, Base64 encoding increases the message size by about 33%.
MTOM does not encode base64 data. It also means that the extra processing overhead for base64 encoding and data decoding is removed. Therefore, MTOM can significantly improve overall messaging performance.
When encoding text messages, binary data is encoded in base64 format and embedded in a SOAP envelope. In MTOM, binary data is included as an MIME (Internet Mail Multipurpose Extension) attachment.
This can be configured as follows in the configuration file.
<bindings> <wsHttpBinding> <binding name="wsHttp" messageEncoding="Mtom" maxReceivedMessageSize="700000"> <readerQuotas maxArrayLength="700000"/> </binding> </wsHttpBinding> </bindings>
You can compare and see that the bytes received using MTOM are significantly smaller compared to text message encoding.
vivek nuna Sep 19 '19 at 10:22 2019-09-19 10:22
source share