Applies to: Exchange Server 2013

Topic Last Modified: 2013-02-22

In Microsoft Exchange Server 2013, there are several different message size limits that apply to messages as they travel through your Exchange organization. For more information, see Message Size Limits.

However, there are client-specific message size limits you can configure for Outlook Web App and email clients that use ActiveSync or Exchange Web Services (EWS). You configure these values in web.config files on Client Access servers. These limits are described in the following table:

Client Configuration file Keys and default values Comments

ActiveSync

%ExchangeInstallPath%ClientAccess\Sync\web.config

<add key="MaxDocumentDataSize" value="10240000"> (value in bytes)

maxRequestLength="10240" (value in kilobytes)

MaxDocumentDataSize specifies the maximum size of data fetched by the ActiveSync protocol.

maxRequestLength specifies the maximum size of data received from an ActiveSync client.

Exchange Web Services

%ExchangeInstallPath%ClientAccess\exchweb\ews\web.config

maxAllowedContentLength="67108864" (value in bytes)

maxReceivedMessageSize="67108864" (value in bytes)

maxAllowedContentLength is an Internet Information Services (IIS) setting that specifies the maximum length of HTTP content requests.

maxReceivedMessageSize is a Windows Communication Foundation (WCF) setting that specifies the maximum message size that's accepted by Exchange Web Services.

There are 14 separate instances of the value maxReceivedMessageSize="67108864" that correspond to different combinations of bindings (http and https) and authentication schemes. There are also two instances of the value maxReceivedMessageSize="1048576" for UMLegacyMessageEncoderSoap11Element bindings that you shouldn't modify.

maxRequestLength is an ASP.NET setting that's present in the web.config file, but is not used by Exchange Web Services.

Outlook Web App

%ExchangeInstallPath%ClientAccess\Owa\web.config

maxAllowedContentLength="35000000" (value in bytes)

maxReceivedMessageSize="35000000" (value in bytes)

maxRequestLength="35000" (value in kilobytes)

There are two separate instances of the value maxReceivedMessageSize="35000000" that correspond to http and https bindings.

If you change the Exchange organization-wide message size limits, you need to verify the message size limits for Outlook Web App, ActiveSync, and Exchange Web Services are set accordingly.

For all message size limits, you need to set values that are larger than the actual sizes you want enforced. This increase in values is necessary to account for the inevitable message size increase that occurs after the message attachments and any other binary data are Base64 encoded. Base64 encoding increases the size of the message by approximately 33%, so the values you specify for any message size limits are approximately 33% larger than the actual usable message sizes. For example, if you specify a maximum message size value of 64 MB, you can expect a realistic maximum message size value of approximately 48 MB.

What do you need to know before you begin?

  • Estimated time to complete: 15 minutes

  • Exchange permissions don't apply to the procedures in this topic. These procedures are performed in the operating system of the Exchange Server.

  • Changes you save to the Web.config configuration file are applied after you restart IIS.

  • To allow for a 33% increase in size due to Base64 encoding, multiply your desired new maximum size value in megabytes by 4/3. To convert the value into kilobytes, multiply by 1024. To convert the value into bytes, multiply by 1048756 (1024*1024). Note that the size increase caused by Base64 encoding could be greater than 33%, and depends on several factors, for example, the attachment file size, type, compression, and the email client used to compose and send the message.

  • Any customized per-server settings you make in Exchange XML application configuration files, for example, web.config files on Client Access servers or the EdgeTransport.exe.config file on Mailbox servers, will be overwritten when you install an Exchange Cumulative Update (CU). Make sure that you save this information so you can easily re-configure your server after the install. You must re-configure these settings after you install an Exchange CU.

  • For information about keyboard shortcuts that may apply to the procedures in this topic, see Keyboard Shortcuts in the Exchange Admin Center.

Tip:
Having problems? Ask for help in the Exchange forums. Visit the forums at: Exchange Server, Exchange Online, or Exchange Online Protection

Use the Command Prompt to configure the client-specific message size limits

  1. In a Command prompt window, open the appropriate web.config file in Notepad. For example, to open the web.config file for Exchange Web services clients, run the following command:

    Copy Code
    Notepad %ExchangeInstallPath%ClientAccess\exchweb\ews\web.config
    
  2. Find the relevant keys in the appropriate web.config file as described in the table earlier in the topic. For example,

    Copy Code
    <requestLimits maxAllowedContentLength="67108864" />
    ....maxReceivedMessageSize="67108864"...
    
    For example, to allow a Base64 encoded maximum message size of approximately 64 MB, change the all instances 67108864 to 89478486 (64*4/3*1048756):

    Copy Code
    <requestLimits maxAllowedContentLength="89478486" />
    ....maxReceivedMessageSize="89478486"...
    
  3. When you are finished, save and close the Web.config file.

  4. Restart IIS by running the following command:

    Copy Code
    IISReset
    

How do you know this worked?

Verification guidance in paragraph, list, or both formats as required.

To verify that you have successfully configured the message size limits for Exchange Web Services clients, you need to send a test message to and from a mailbox that's being access by an Exchange Web Services client. You can try a few smaller attachments or one large attachment so the test messages are approximately 33% less than the value you configured. For example, a configured value of 85 MB results in a realistic maximum message size of approximately 64 MB.