【问题标题】:Exchange web server more than, 1000 itemsExchange Web 服务器超过 1000 项
【发布时间】:2013-07-30 17:39:36
【问题描述】:

我尝试获得超过 1000 个联系人,我有超过 10000 个,而微软 EWS 只让我获得 1000 个项目(联系人)。 ContactsFolder contactsFolder = ContactsFolder.Bind(this.service, WellKnownFolderName.Contacts,new PropertySet(BasePropertySet.IdOnly,FolderSchema.TotalCount));

            ItemView view = new ItemView(contactsFolder.TotalCount);

            //ItemView view = new ItemView(1000,0,OffsetBasePoint.Beginning+1);

            service.TraceEnabled = false;
            FindItemsResults<Item> fiResults = null;
            do
            {
                fiResults = service.FindItems(WellKnownFolderName.Contacts, view);
                PropertySet itItemPropSet = new PropertySet(BasePropertySet.IdOnly,
                ContactSchema.GivenName,
                ContactSchema.Surname,
                ContactSchema.AssistantPhone,
                ContactSchema.BusinessPhone,
                ContactSchema.BusinessPhone2,
                ContactSchema.CarPhone,
                ContactSchema.CompanyMainPhone,
                ContactSchema.HomePhone,
                ContactSchema.HomePhone2,
                ContactSchema.MobilePhone,
                ContactSchema.OtherTelephone,
                ContactSchema.Pager,
                ContactSchema.PrimaryPhone,
                ContactSchema.CompanyName,
                ContactSchema.BusinessFax,
                ContactSchema.Id);

                view.Offset += fiResults.Items.Count;
            } while (fiResults.MoreAvailable == true);

【问题讨论】:

    标签: exchangewebservices


    【解决方案1】:

    使用偏移量获取更多项目。 Microsoft 有一篇文章如何做到这一点,我什至在您的代码中看到了注释部分。 http://msdn.microsoft.com/en-us/library/exchange/dd633698(v=exchg.80).aspx

    【讨论】:

      猜你喜欢
      • 2013-07-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多