Hi,
Technology used: EWS Managed Api 15.00.0516.014, Exchange 2013 On Premise, Outlook 2013, .Net 4.5/C#
We have an application that synchronize contacts between Exchange and our application database.
Often, when we load a contact from Exchange, we get an empty note for the contact, although we can see that the contact has a note in Outlook. Plus this doesn't occur all the time, this can work for a contact and later it doesn't work anymore for the same contact.
Usually in our test case, we just modify one other field like name or phone number, we don't modify the note itself.
The application reads both the HTML and Text version of the note, in a separate call using the following code:
var bodyPropertySet = new PropertySet() { ContactSchema.Body, ContactSchema.TextBody }; bodyPropertySet.RequestedBodyType = BodyType.HTML; var response = this.service.BindToItems(new ItemId[] { exchangeContact.Id }, bodyPropertySet); var contact = (Contact)response[0].Item; var htmlNote = contact.Body.Text var textNote = contact.TextBody.Text
A "corrupt" HTML note looks always the same:
<html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8""><meta name=""Generator"" content=""Microsoft Exchange Server""><!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style></head><body><font size=""2""><span style=""font-size:10pt;""><div class=""PlainText""> </div></span></font></body></html>
Note that this occurs only in one environment. On another environment that uses the same version Exchange (2013 on premise), but a less loaded server (a test server), we can't replicate.
What we suspect but with no guarantee:
- a problem with Outlook cache where Outlook would send to Exchange a temporary version of the contact with the note empty
- a separate process in Exchange that would convert the note from RTF to HTML. Our application would get a version of the contact when the conversion is not finished
- a problem with the antivirus and the cache file of Outlook...
Has anyone encountered such issue before? Any idea/pointer where to look at?
Thanks for your help,
Alexandre