I'm developing a WCF service to send and receive files using MTOM encoding. I have everything up and running with the following configuration.
<customBinding>
<binding name="<omitted>">
<mtomMessageEncoding messageVersion="Soap12" />
<httpTransport maxReceivedMessageSize="2097152" />
</binding>
</customBinding>
However, if the file I send is smaller than 768 bytes, then instead of using MTOM encoding, the file is encoded using Base64 and sent as part of the message itself.
Does anyone know how to force WCF to use MTOM encoding for files smaller than 768 bytes?