Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Unable to send large attachments using EWS client


View products that this article applies to.

Symptoms

Consider the following scenario:
  • Users connect to their mailbox using an EWS client.
  • The user's mailbox is located in Site B.
  • The client connection is made to an Exchange server in Site A.
  • The Exchange server in Site A proxies the request to an Exchange server in Site B.

In this scenario, the user is unable to send an email with large attachments. When using the Outlook for Mac client, it moves the message into the drafts folder and returns the following error:

An unknown error has occurred. Connection to the server failed or was dropped. Outlook cannot send the message, 
because the message size exceed the maximum limit set on the server

↑ Back to the top



The EWS logs in Site A show an HTTP 500 status with a generic error similar to the following:

ReportException_Message=Exchange Web Services are not currently available for this request because none of 
the Client Access Servers in the destination site could process the request.;ReportException_StackTrace= at
Microsoft.Exchange.Services.Wcf.EWSService.GetServiceAsyncResult[TSoapResponseBody](IAsyncResult result) at
Microsoft.Exchange.Services.Wcf.EWSService.CreateSoapResponse[TSoapResponse;TSoapResponseBody](IAsyncResult
result; Func`2 createSoapResponseCallback) at AsyncInvokeEndEndCreateItem(Object ; Object[] ; IAsyncResult )
at System.ServiceModel.Dispatcher.AsyncMethodInvoker.InvokeEnd(Object instance; Object[]& outputs;
IAsyncResult result) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeEnd(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage7(MessageRpc& rpc) at
System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet);

The EWS logs in Site B show an HTTP 500 status with a generic error similar to the following:

ReportException_Message=The remote host closed the connection. The error code is 0x80070057.;
ReportException_StackTrace= at System.ServiceModel.Channels.HttpOutput.HostedRequestHttpOutput.HostedResponseOutputStream.CheckWrapThrow(Exception e) at
System.ServiceModel.Channels.HttpOutput.HostedRequestHttpOutput.HostedResponseOutputStream.Write(Byte[] buffer; Int32 offset; Int32 count) at
System.IO.BufferedStream.FlushWrite() at System.IO.BufferedStream.Flush() at System.Xml.XmlStreamNodeWriter.Flush() at
Microsoft.Exchange.Services.Wcf.SoapWcfResponseRenderer.Render(Message message; Stream stream) at
Microsoft.Exchange.Services.Wcf.MessageEncoderWithXmlDeclaration.WriteMessage(Message message; Stream stream) at
System.ServiceModel.Channels.HttpOutput.WriteStreamedMessage(TimeSpan timeout) at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) at
System.ServiceModel.Channels.HttpRequestContext.OnReply(Message message; TimeSpan timeout) at
System.ServiceModel.Channels.RequestContextBase.Reply(Message message; TimeSpan timeout) at
System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.Reply(MessageRpc& rpc);

↑ Back to the top


Cause

The connection between the Exchange servers in the two sites for this request is dropped based on a ProxyTimeout setting.

↑ Back to the top


Resolution

To resolve this issue, increase the ProxyTimeout value on the CAS server by editing the web.config file for EWS. To do this, follow these steps:

  1. Locate the web.config file and open the file by using Notepad or another text editing program. The default location is %ExchangeInstallPath%\ClientAccess\exchweb\ews.
  2. In the file, scroll down the text to find the following statement: <AppSettings>
  3. Add the following line within the <AppSettings> section to increase the timeout:
     
    <add key="ProxyTimeout" value="120000" /> 
  4. Restart the MSExchangeServicesAppPool application pool.

Note: The default value for the ProxyTimeout is 59000. This value should be increased gradually until the issue is resolved. For example, start by increasing the timeout to 120000 and if the issue persists, increase the value to 210000.

↑ Back to the top


Keywords: kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 3107326
Revision : 1
Created on : 1/7/2017
Published on : 1/7/2017
Exists online : False
Views : 318