Exchange – Changing message size limits

How Can We Help?

Exchange – Changing message size limits

Exchange 2013/2016/2019

  1. Log on to your target MS Exchange Server CAS role machine.
  2. Go to your EWS settings file path:
    %ExchangeInstallPath%FrontEnd\HttpProxy\ews\web.config
  3. Open the file Web.config by using any text editor.
  4. Locate the section <system.webserver>, and in the subsection <security> find the key:
    <requestLimits maxAllowedContentLength="<value>" />

    and change its <value> to 104857600.

  5. Save and close the file.
  6. Log on to your target MS Exchange Server Mailbox role machine.
  7. Go to your EWS settings file path:
    %ExchangeInstallPath%ClientAccess\exchweb\ews\web.config
  8. Locate the section <system.webserver>, and in the subsection <security> find the key:
    <requestLimits maxAllowedContentLength="<value>" />

    and change its <value> to 104857600.

  9. Locate all occurrences of maxReceivedMessageSize in the file and change their values, for example, to 104857600. Be aware that you must not change the default values of maxReceivedMessageSize for UMLegacyMessageEncoderSoap11Element bindings, as described in this Microsoft article.
  10. Save and close the file.
  11. Open the ems Exchange Management Shell (EMS).
  12. To change the maximum size of received messages in the Transport Service, execute the following PowerShell cmdlet in EMS:
    Set-TransportConfig -MaxReceiveSize 100MB
  13. Restart the machine, and you are good to go.