Cannot send large messages via ActiveSync


When sending larger messages via the ActiveSync service the message fails to send. Sending small emails works ok.

Some devices may return an error indicating that "The message that was sent to the server was rejected because the message was too large". Not all email clients may indicate the failure and could just keep the message in the outbox folder and keep retrying until removed from the folder.


A global IIS restriction preventing uploads larger than 49152 bytes. IIS sets a default value of 49152 bytes for the "UploadReadAheadSize" value which limits the amount of bytes allowed in the entity body of a request and the number of bytes a Web server will read into a buffer and pass to an ISAPI extension (which is how the ActiveSync service works).

  • Navigate within the IIS control panel applet to the "Sites" node.
  • Determine the ID for the "MailEnable Protocols" website
  • Next navigate to the IIS log files path: C:\inetpub\logs\LogFiles
  • Locate the W3SVC(ID) folder, where ID is the number of the website ID above in step 2.
  • Sort the log files by "Date Modified' and then open the latest log files in respect to the date/time you sent the message from the mobile device.
  • Search for lines like the examples below:

2013-11-27 23:43:48 POST /Microsoft-Server-ActiveSync 443 - Apple-iPad3C4/1102.55400001 413 0 0 6396

2013-11-27 23:43:48 POST /Microsoft-Server-ActiveSync 443 - 1921.68.0.2 Apple-iPad3C4/1102.55400001 413 0 0 6396

The above log snippets report a 413 error in the line which indicates the "Request Entity is too large". 

Also, IIS 7 and later have an upload limit of 30Mb, which limits the size that clients can post to the web server. To increase this you need to change the maxAllowedContentLength as described in the resolution below.


Open a Windows command prompt with administrator rights and navigate to the following location:


Run the following command:

cscript adsutil.vbs set w3svc/14/uploadreadaheadsize 51200000

Where "14" in the above command is the website ID.

Changing the maxAllowedContentLength can be done in the IIS manager. Select the MailEnable Protocols website (or if you are running ActiveSync under another site, select that site). Select the Request Filtering option by doubling clicking it when in the Features View. In the Actiions pane on the right side of the screen click the Edit Feature Settings... link. Edit the Maximum allowed content length (Bytes) value to the maximum you want to accept.


Product:MailEnable (ME-6.X Pro-Any Ent-Any)
Class:TRB: Troubleshooting (Configuration or Environment)
Revised:Thursday, November 18, 2021