How to Manage Maximum Message Size in Outlook Web Access
Applies to: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007
Topic Last Modified: 2010-04-27
This topic explains how to use the Web.config file and the Exchange Management Shell to enable large messages to be sent from Microsoft Office Outlook Web Access. In this case, Outlook Web Access is installed on a computer that is running Microsoft Exchange Server 2007 and that has the Client Access server role installed.
Outlook Web Access is an application that uses ASP.NET and is affected by the configuration of ASP.NET settings. ASP.NET uses the maxRequestLength setting to determine the maximum amount of data that the Web browser can submit to the Client Access server. The maxRequestLength setting is located in the Web.config file.
Maximum size limits are set on mailboxes to help control the size of messages that can be sent or received. The maximum message size limits apply to the total size of a message. This includes the message header, the message body, and any attachments. If the maximum message size that can be sent from a mailbox is configured to be more than the maxRequestLength setting, an error may occur when a user sends a large message from Outlook Web Access.
To avoid this issue, configure maxRequestLength to be at least as large as the largest maximum message size that is set on the mailboxes in your organization.
If you try to create or send a message that exceeds the maximum message size or maxRequestLength, a warning will appear in Outlook Web Access. The text of the warning varies depending on the conditions that generated it. The following warnings may occur:
When you try to upload an attachment that is larger than the maximum message size, you receive the following error message in the Upload dialog box:
The attachment you are trying to upload exceeds the maximum size limit for attachments allowed by your organization. For more information, contact technical support for your organization.
When you try to upload one or more attachments that are larger than the maxRequestLength, you receive the following error message in the Information Bar within the message:
The files <file names> were not attached because they exceed the maximum size limit of <size limit> megabytes (MB) for attachments.
Assume that you have attached several files to a message and that each of the files is smaller than either the maximum message size or the maxRequestLength value. If these files together are more than the maximum message size, you receive an error on the message form when you click Send:
This message could not be sent because it exceeds the maximum size allowed.
If you are running Exchange 2007 on a Windows Server 2008-based computer, you must also configure the Outlook Web Access server to allow content that is equal to the size of the maximum message size that can be sent by Outlook Web Access. If you do not do this, one of the following errors may occur.
When you use Outlook Web Access to send a large message from a workstation, you receive the following error message:
Server Error 404 - File or directory not found
The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.
When you use Outlook Web Access to send a large message from the console on a computer that is running Exchange Server 2007 Service Pack 1 (SP1), you receive the following error message:
Server Error in Application "DEFAULT WEB SITE/OWA"
HTTP Error 404.13 - Not Found
The request filtering module is configured to deny request that exceeds the request content length.
To perform this procedure, the account you use must be delegated the following:
Membership in the local Administrators group
For more information about permissions, delegating roles, and the rights that are required to administer Exchange 2007, see Permission Considerations.
Find the Web.config file on the Client Access server. The default location is <drive>\Program Files\Microsoft\ExchangeServer\ClientAccess\Owa.
Make a backup copy of the file.
Use Notepad or another text editor to open the original file. Do not use Internet Information Services (IIS) to edit the Web.config file.
Find the maxRequestLength value, and change it to the value that you want. The value is in kilobytes (KB), and the default value is 30000. The following example shows the maxRequestLength value in the Web.config file:
<httpRuntime maxRequestLength="30000" />
Save and close the file.
Make sure that you change the existing maxRequestLength value in the Web.config file. Do not add a second instance of maxRequestLength. If a second instance of maxRequestLength is added to the Web.config file, the Exchange Application Pool will stop unexpectedly.|
Start the Exchange Management Shell.
Set-Mailbox -Identity "<NameOfMailbox>" -MaxSendSizeSize <value>, and then press ENTER.
For example, to set the sending message sizes for the mailbox of John Smith to 10 megabytes (MB), type:
Set-Mailbox -Identity "John Smith" -MaxSendSize 10mb -MaxReceiveSize 10mb
Start the Exchange Management Shell.
Type the following command:
Set-TransportConfig -MaxSendSize Size <value>
For example, to set the maximum message size to 10 MB, type:
Set-TransportConfig -MaxSendSize 10MB.
If you run Exchange Server 2007 on an Windows Server 2008-based computer, you must also complete the following procedure.
At a command prompt, type the following:
Type the following command:
appcmd set config "Default Web Site/owa" -section:requestFiltering -requestLimits.maxAllowedContentLength:<Content_Length_In_Bytes>
If mail is routed externally to a different messaging system, set the value of the MaxMessageSize parameter in the registry to configure the SendConnector.
If mail is routed between two users in the same Exchange organization and if the users are homed in two different Active Directory sites, change the MaxMessageSize parameter on the Active Directory site link.
If mail is routed externally to a different messaging system, you may have to modify the maximum message size that is configured on the Send connector. Also, if mail is routed between users who are in the same Exchange organization but who are located in different Active Directory sites, you may have to modify the maximum message size that is configured on the Active Directory site link.
For more information about how to set the maximum message size in Exchange 2007, see the following topics:
For more information about message size in Exchange, see the Exchange Server Team Blog article Large Message Processing in Exchange, Part 1: Prevention and Planning.