Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Recursive folder search with Exchange Web Services in single call?

Posted on 2011-09-08
1
Medium Priority
?
955 Views
Last Modified: 2012-08-14
My C# application mines email data from exchange via EWS, searches usually take 1-2 minutes. I recently ran into a client where it is taking ~60 minutes to retrieve one user's data.  I am trying to figure out a way to bring that number down, even getting it down to 30 minutes would probably work.  The user in question has a 17GB mailbox with many folders and subfolders (I don't know the exact number).  I suspect the folder tree is more of a problem than the actual mail volume, I'll get to that in a minute.

I currently enumerate all the folders in a user's mailbox and then make a "FindItems" call to each folder using a search filter to retrieve only the last day's worth of data.  I suspect that what's taking a lot of time is just making all those calls for folders which probably don't even have data we need anyway. Is there a way to just make one recursive call to the inbox?  Ultimately the data I end up getting back isn't a lot, I have other users with a lot higher daily volume of mail which I can retrieve quickly, I think because they don't have the complex folder tree which this user has.

0
Comment
Question by:rerard
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 31

Accepted Solution

by:
LeeDerbyshire earned 2000 total points
ID: 36909764
It would be nice if you could do a FindItem with a deep traversal, but this says that it isn't supported.  Presumably because of the risk of returning a mountain of data:
http://msdn.microsoft.com/en-us/library/aa563373(v=exchg.140).aspx
But the article does suggest that you can do it by creating a search folder in the mailbox, which seems like a good idea.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will help to fix the below errors for MS Exchange Server 2013 I. Certificate error "name on the security certificate is invalid or does not match the name of the site" II. Out of Office not working III. Make Internal URLs and Externa…
Check out this step-by-step guide for using the newly updated Experts Exchange mobile app—released on May 30.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
This video demonstrates how to sync Microsoft Exchange Public Folders with smartphones using CodeTwo Exchange Sync and Exchange ActiveSync. To learn more about CodeTwo Exchange Sync and download the free trial, go to: http://www.codetwo.com/excha…

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question