Messaging and Colloboration

Monday, 27 February 2017

ActiveSync Attachment Size Issue

           When people trying to send email with bigger attachments from mobile device, they will notice that email moves to Outbox and it will try resending in a timely fashion. Sometime people will get ‘memory full’ warnings after certain retries.

What we normally do?
 Obviously we will check the size of the attachment and our organization configurations, finally activesync’s web.config file [%ExchangeInstallPath%ClientAccess\Sync\web.config], in the  web.config file we need to consider certain parameters that accounts for attachment size,

  1.  maxDocumentDataSize ; default size is 10240000 bytes
  2.  maxRequestLength ; default size is 10240 KB
  3.  maxAllowedContentLength ; default size is 30000000 bytes

You will be amazed, the max allowed size is 10 MB but still user can’t send email with attachment size of 8Mb, do you know why?
Because of “33% Rule”

We have to subtract 33% from the total size,
If we subtract 33% from 10240 KB, then the resultant would be 6860.8 Kb, so if you configure ‘maxrequestlength’ value to 10MB, then user can send only 6.8MB of attachment (approx)

But, why 33percent ?
33% accounts for Base64 encoding of attachments.Base64 encoding normally increase the size of the messages by 33% that’s why its advisable to choose 33% more than the actual size.

Why we need Base64 encoding?
Some protocols may interpret your binary data or text as control characters or that it think it’s a combination of data and control data, inorder to avoid this situation, we need some encoding mechanism like Base 64.


So we need to change the foresaid parameter values in the web.config file to higher than the default.







Once done with changes , need to rest IIS (cmd -> IISreset) to take effect.

Note:
33% rule is not only applicable to Activesync, it also applicable to Exchange Web Services( EWS) and Outlook WebApp(OWA).

References:
https://technet.microsoft.com/en-gb/library/hh529949(v=exchg.150).aspx

No comments:

Post a Comment