Max Message Size Increase: OWA, IMAP, EWS (maxRequestLength and maxAllowedContentLength)
I have retrieved this info from the following URL.
By Default, the maximum message sizes for Exchange 2007 related services are as follows:
These settings are controlled by several factors: The maxRequestLength value within the web.config file for each IIS virtual directory and the maxAllowedContentLength value which is stored within IIS’ settings. (Metadata I presume). The last attribute is for Windows 2008 and IIS 7 only.
We altered the default settings to accommodate for Entourage 2008 usage. Here is what we know Entourage and its integration with Microsoft Exchange:
Entourage file attachment limitations are managed by the Exchange 2007 server in the EWS folder (IMAP\POP).
Assuming that when you don’t impose an attachment size limitation on a user– presumably because you don’t want there to be a limitation on their attachment sizes– is enough won’t work. Exchange applies its default limitation of 5mb!
Entourage applies overhead when converting files from MAC land to Windows. Allow for 30% overhead when defining message attachments.
If you want to change the settings for OWA, IMAP, and ActiveSync, edit the web.config file for each of these directories…In my example, we changed all values to 50 MB.Edited the web.config entry–> <httpRuntime maxRequestLength=”50000” /> Please note this value is in Kilobytes (KB).Edited the web.config entry–><requestLimits maxAllowedContentLength=”52000000“ /> Please note this value is in bytes (B).
C:\Program Files\Microsoft\Exchange Server\ClientAccess\Owa
C:\Program Files\Microsoft\Exchange Server\ClientAccess\exchweb\ews
C:\Program Files\Microsoft\Exchange Server\ClientAccess\Sync
If you are running Windows 2008 and IIS 7, you must also change the maxAllowedContentLength value.
You must do this from a command window in the c:\windows\system32\inetsrv directory. (Location of the appcmd.exe file)appcmd set config “Default Web Site/ews” -section:requestFiltering -requestLimits.maxAllowedContentLength:50000000appcmd set config “Default Web Site/owa” -section:requestFiltering -requestLimits.maxAllowedContentLength:50000000appcmd set config “Default Web Site/Microsoft-Server-Activesync” -section:requestFiltering -requestLimits.maxAllowedContentLength:50000000
Please note, these values are required in bytes and not KB. If these values do not equal the maxRequestLength value (50,000 KB versus 5,000,000 bytes), you will receive 404 File not found errors.
You must reboot the server for the settings to take full effect.
Also note, if you apply Exchange 2007 SP2, after making these changes, you will have to re-apply as the SP2 install clears the settings.
Article Update: In Exchange 2010 and Exchange 2010 SP1, you should no longer have to adjust these settings for ActiveSync or EWS. Microsoft has set the defaults to 2 GB. Outlook Web App is set to 35 MB, which you can also adjust. Microsoft’s stance has changed as they now rely on the message transport settings on the Edge and HUB servers to control the max message limits.
If you are Exchange 2010 follow these steps:
You need to be assigned permissions before you can perform this procedure. To see what permissions you need, see the “Text editor” entry in the Client Access Permissions topic.
- Find the Outlook Web App Web.config file on the Client Access server. The default location is <drive>\Program Files\Microsoft\Exchange Server\V14\ClientAccess\Owa.
- Make a backup copy of the web.config file.
- Open the original file using an editor such as Notepad. Don’t use Internet Information Services (IIS) Manager to edit the Web.config file.
- Find maxRequestLength and change it to the value that you want. The value is stored in kilobytes (KB). The default value is 35000. The following example shows the maxRequestLength value in the Web.config file.
<httpRuntime maxRequestLength=”51200” />
Note: This is 50 MB (1024 X 50)
- Find maxAllowedContentLength and change it to the value that you want. The value is stored in bytes (B). The default value is 35000000. The following example shows the maxRequestLength value in the Web.config file.
<requestLimits maxAllowedContentLength=”51200000” />
Note: This is 50 MB (1024 X 50)
- Save and close the file.
- Reset IIS