Bonne journée. J'utilise EWS Managed Api 2.0 pour obtenir les contacts Exchange 2013 dans mon application .NET 4.0.API gérée par EWS: impossible de récupérer les contacts, elle renvoie toujours 0
J'ai une liaison de serveur d'échange fonctionnante. voici mon code.
FolderId foldid = new FolderId(WellKnownFolderName.Contacts);
ContactsFolder contactfolder = ContactsFolder.Bind(exservice, foldid);
ItemView view = new ItemView(500);
view.PropertySet = new PropertySet(BasePropertySet.IdOnly);
// Request the items in the Contacts folder that have the properties that you selected.
FindItemsResults<Item> contactItems = exservice.FindItems(foldid, view);
// Display the list of contacts. (Note that there can be a large number of contacts in the Contacts folder.)
foreach (Item item in contactItems)
{
if (item is Contact)
{
Contact contact = item as Contact;
}
}
Mais quand je lance le code, le ContactItems renvoie 0. Ce qui est étrange, parce que nous avons des contacts dans Exchange 2013. (ITEMCOUNT = 0, TotalCount = 0)
EWS Managed API Contact is 0 Image
Comment je résous ça? J'ai posté cette question dans le problème Microsoft Tech mais personne n'a encore répondu.
Merci beaucoup.