E-mail messages cannot be retrieved by an Exchange Web Service (EWS)-based application if there are invalid control characters in the text body of the e-mail message

Article translations Article translations
Article ID: 972009 - View products that this article applies to.
Expand all | Collapse all

SYMPTOMS

You develop an Exchange Web Service (EWS)-based application to retrieve an e-mail message from a Microsoft Exchange Server 2007 server. If the e-mail message has invalid control characters in the text body, EWS cannot retrieve the e-mail message because of an InvalidOperationException error. However, you can access the e-mail messages by using other protocols, such as Microsoft Outlook Web Access (OWA), Microsoft Office Outlook, and Web DAV client.

CAUSE

Invalid control characters in the plaintext body cause a XML deserialization error. As a result, the EWS application crashes.

RESOLUTION

To resolve this problem, install the following update rollup:
971534 Description of Update Rollup 1 for Exchange Server 2007 Service Pack 2
Note To enable the new feature, you want to set or edit the value of the OverwriteInvalidCharsInPlainTextBody key to "True" in the Web.config file. The Web.config file is located in the ClientAccess\Exchweb\Ews\ folder in the Exchange installation folder. To set or edit the value of the OverwriteInvalidCharsInPlainTextBody key to "True," add or edit the following section directly under the <Configuration> node of the Web.config file:
<appSettings>
    <add key="OverwriteInvalidCharsInPlainTextBody" value="True"/>
</appSettings>

STATUS

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Properties

Article ID: 972009 - Last Review: November 19, 2009 - Revision: 1.0
APPLIES TO
  • Microsoft Exchange Server 2007 Service Pack 2, when used with:
    • Microsoft Exchange Server 2007 Standard Edition
    • Microsoft Exchange Server 2007 Enterprise Edition
Keywords: 
kbexpertiseinter kbfix kbhotfixrollup kbqfe kbsurveynew KB972009

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com