有时在您收到电子邮件时挂起,因此整个程序挂起,如何检查服务挂起?
ExchangeService service = new Sender().GetService(sourceEmail);
SearchFilter filter = new
SearchFilter.SearchFilterCollection(LogicalOperator.And, new SearchFilter.IsEqualTo(EmailMessageSchema.IsRead, false));
ItemView view = new ItemView(20) { PropertySet = PropertySet.IdOnly };
if (oldest) view.OrderBy.Add(ItemSchema.DateTimeReceived,SortDirection.Ascending);
FolderId sharedMailbox = new FolderId(WellKnownFolderName.Inbox, sourceEmail);
/* hangs on this call */
FindItemsResults<Item> findResults = service.FindItems(sharedMailbox, filter, view);
答案 0 :(得分:0)
我遇到了 FindItems 挂起的问题,
这似乎与我有一个我没有关闭的 StreamingSubscriptionConnection 对象有关。