开发者

FindItemsResults<Item> does not find any items

I am using the following to code to get emails of the Inbox folder of a mail account.

ExchangeService xchange = new ExchangeService(ExchangeVersion.Exchange2007_SP1); 
FindItemsResults<Item> inboxResults = xchange.FindItems(WellKnownFolderName.Inbox,
                                                          new ItemView(10));

It does not find any items in the Inbox folder, even though there are many. I used the same code to access inbox of another account and it worked. The permissions on the Inbox folders of the two accounts are identical. I googled for possible reasons but nothing helped. I would really appreciate any help.

Following is the trace of xml reponse from the server

<Trace Tag="EwsResponse" Tid="1" Time="2011-09-19 16:38:38Z" Version="14.02.0051.000">
  <?xml version="1.0" encoding="utf-8"?>
  <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <soap:Header>
      <t:ServerVersionInfo MajorVersion="8" MinorVersion="2" MajorBuildNumber="176" MinorBuildNumber="2" Version="Exchange2007_SP1" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />
    </soap:Header>
    <soap:Body>
      <m:FindItemResponse xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages">
        <m:ResponseMessages>
          <m:FindItemResponseMessage ResponseClass="Success">
            <m:ResponseCode>NoError</m:ResponseCode>
            <m:RootFolder IndexedPagingOffset="0" TotalItemsIn开发者_运维问答View="0" IncludesLastItemInRange="true">
              <t:Items />
            </m:RootFolder>
          </m:FindItemResponseMessage>
        </m:ResponseMessages>
      </m:FindItemResponse>
    </soap:Body>
  </soap:Envelope>
</Trace>


I still think its a security problem. Double check all your permissions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜