The only way I was able to replicate this was by connecting to our Exchange Server which is a 2016 server. I had to use VPN with the IP address of the PC running the Server. Do you have the URL to connect to for the account info you provided. I will try and see if I can see anything on that site. I believe you will have to have used the account in exchange, have some contacts and send and receive mail to have exchange create the caches.
There is a lot of code that does error recovery, restarting a collection if it is interrupted, filtering, etc. but at the heart of the loop is a recursive loop the starts at the root and calls a method to get folders at the current level, call the recursion for any child folder encountered. The folders are added to a collection so that when the recursion is complete the collection contains all the folders. At the end of the code I added the PPLExchangeFolderInfo definition. It is really just a
ExchangeFolderInfo object with an enumeration classify the message classes into a common name space for all our other objects.
Dictionary folderlist = new Dictionary<string,
PPLExchangeFolderInfo>();
emi = ewsClient.GetMailboxInfo(); // get mailbox info
efic = ewsClient.ListSubFolders(emi.RootUri); // get list of folders in the root
foreach (ExchangeFolderInfo efi in efic) // iterate each folder in parent
{
folderlist.Add(efi.DisplayName, pplEFI);
ExchangeGetSubfolders(efi.DisplayName,
pplEFI,
folderlist,
pcp,
ref FolderRestartComplete); // get next folder
}
// at this point folderlist contain information on all the folders in this account
return folderlist;
private void ExchangeGetSubfolders(string parentpath,
PPLExchangeFolderInfo CurrentLevel,
Dictionary Outefi,
pplCommonData.ProgressCheckPoint pcp,
ref bool FolderRestartComplete)
{
efic = ewsClient.ListSubFolders(CurrentLevel.efi);
foreach (ExchangeFolderInfo efi in efic) // iterate each folder in parent
{
Outefi.Add(newParentPath, pplEFI); // add to the list
ExchangeGetSubfolders(efi.DisplayName,
pplEFI,
folderlist,
pcp,
ref FolderRestartComplete); // get next folder
}
Here is the main part of the PPLExchangeFolderInfo class:
public class PPLExchangeFolderInfo
{
public ExchangeFolderInfo efi;
public MESSAGE_CLASS mc;