E2007 EWSMA C# EmailMessage with Attachments causing ErrorInternalServerError in ServiceResponseException RRS feed

  • Question

  • I am having an issue with my application sending creating and sending an EmailMessage with attachments through the EWS managed services.

    It works with some data, but for one set of data and attachments it fails and returns a ServiceResponseException. The Response.ErrorCode in the exception is ErrorInternalServerError.

    How can I get more information on the error code that is occurring?

    • I have looked in the event logs on the server and found nothing.
    • I have verified that impersonation is working correctly so that the message is attributed to the logged in user in Exchange.

    Is there a way I can get the XML of the request and response as well?

    Tuesday, April 5, 2011 3:25 AM

All replies

  • With the Managed API you can enable tracing by setting trace Enabled on the ExchangeService object eg

    service.TraceEnabled =


    This will then allow you to see the requests and responses that are sent to the server. How big are the attachments your trying to send ? the maxrequestlength limits the maximum size of attachment to between 20-25 MB.


    Wednesday, April 6, 2011 3:18 AM