Problem with Aspose.Email GetMailBoxInfo

Hi Aspose Team

We are using Exchange server 2013 version 15.0.1293.2
And Aspose.Email 17.7 (I tried 17.9 and 17.11).

when code tries to get mailbox info Aspose throws an exception.
ExchangeMailboxInfo mailboxInfo = client.GetMailboxInfo(userEmail);

Exception
[Aspose.Email.Clients.Exchange.ExchangeException] = {"Mailbox information can not be read.\r\nFolder Id: ‘msgfolderroot’; Message: The specified object was not found in the store.\r\nFolder Id: ‘calendar’; Message: The specified folder could not be found in the store.\r\nFolder Id: ‘contacts’; Message: The s…

my Code.
{
// Initialize the ExchangeWebServiceClient class and connect
using (IEWSClient client = EWSClient.GetEWSClient(_exchangeWebServiceUrl, credential))
{
ExchangeMailboxInfo mailboxInfo = client.GetMailboxInfo(userEmail);
string contactsUrl = mailboxInfo.ContactsUri;

                //TK0063150 corrected argument for contactsurl
                foreach (MapiContact outlookContact in client.GetContacts(contactsUrl)) 
                    {
                        ContactEntity contact = new ContactEntity();

                        if (outlookContact.NameInfo != null)
                        {
                            contact.DisplayName = outlookContact.NameInfo.DisplayName;
                            contact.FirstName = outlookContact.NameInfo.GivenName;
                            contact.MiddleName = outlookContact.NameInfo.MiddleName;
                            contact.LastName = outlookContact.NameInfo.Surname;
                        }
                        if (outlookContact.ProfessionalInfo != null)
                        {
                            contact.CompanyName = outlookContact.ProfessionalInfo.CompanyName;
                            contact.Department = outlookContact.ProfessionalInfo.DepartmentName;
                            contact.JobTitle = outlookContact.ProfessionalInfo.Title;
                        }
                        if (outlookContact.ElectronicAddresses != null)
                        {
                            if (outlookContact.ElectronicAddresses.Email1 != null && outlookContact.ElectronicAddresses.Email1.EmailAddress != null)
                            {
                                contact.Email = outlookContact.ElectronicAddresses.Email1.EmailAddress.Trim();
                            }
                        }

                        contacts.Add(contact);
                    }
            }
        }
        catch (Exception exception)
        {
            throw new Exception(string.Format("Exchange Error {0} ", exception.Message), exception);
        }

Please advise as soon as possible

@gmanukyan.onebeacon,

Could you please confirm if the folders you are accessing exist on destination mailbox? The issue seems specific to your server. If it is possible for you to share a test account’s credentials on your server with us, we’ll be able to observe the problem for assisting you further.

Kashif

after working with our server team we figured out that there was an access privilege issue. the application did not have access to user’s folders. So this issue can be closed.
Thanks

@gmanukyan.onebeacon,

Thank you for the feedback.