none
No access on exchange mail with MAPI (also tested with MFCMAPI) RRS feed

  • Question

  • Hello

    We have a strange behaviour!
    We read all mails from server into our database (online connection, not cache mode). This works fine with several postboxes.

    Now we have a postbox, which is processed 41% (of ~35000 item). Then some calls to IMAPIProp::GetProps failed with 0x80004005 (MAPI_E_CALL_FAILED)!?? Also MFCMAPI don't display any props.

    Curiously, Outlook can display these mails. I checked permission, but in Outlook no special permessions are set.

    What could be the reason?
    We would like to release our software, but this insecure us to release with peace of conscience.


    Tuesday, May 1, 2018 11:22 PM

Answers

  • Sorry for my late response.

    We had created a microsoft ticket and checked this problem with engineer Andrei Ghita.
    He found a workaround. Firstly call CopyProps and then to call GetProps on copyed buffer. His explanation was, that the servers exchange postbox must be corrupted. This is possible some times and known. Because outlook use his own code, it could the reason that outlook can transfer and corrected the item into local cache. That's also the reason that outlook can displaying the item and it is possible to GetProp on local cache.

    :/


    Sunday, January 6, 2019 10:55 AM

All replies

  • Are you sure you don't leak any MAPI objects running out of RPC channels?

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.5 is now available!

    Tuesday, May 1, 2018 11:41 PM
  • Hello Michael,

    Do you have antivirus or firewall software set up on a problematic machine?


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers

    Tuesday, May 1, 2018 11:53 PM
  • @Dmitry Streblechenko:

    Could be, but I don't hope :)
    What is the best method for check this? (perfmon?)
    I've ever used wrapper classes with automatic destruction for freeing memory or com objects.
    Memory usage is more or less stable.

    But what about MFCMAPI? It have his own rpc pool, but there I can't list props, too.
    The first fault is every time exactly at same mail item and then continues. That sounds not for a sporadic problem like rpc channels, isn't it?
    We already backuped a complete database with over 33000 items...

    Is it possible that the server postbox is corrupted or damaged?

    Your opinion:
    If you have to guess: what percentage is the problem of MAPI and the developer? ;)
    Is MAPI a very stable and mature protocol? What is your experiance with MAPI?





    Wednesday, May 2, 2018 12:54 AM
  • Thanks Eugene Astafiev

    Good point, but no.
    The problem is reproducable at 2 different machines, postbox accounts and release/debug version.


    Wednesday, May 2, 2018 12:57 AM
  • Which version of MAPI you were developing? If it is not the latest version, can you reproduce this issue using the latest version API?

    Since the code works well before get this issue, is this issue relative to the specific post. You may skip that item to check whether the code could go on.

    Friday, May 4, 2018 10:37 AM
  • Hello Michael,

    I'd recommend enabling Outlook logs and checking what Outlook writes there. See How to enable global and advanced logging for Microsoft Outlook for more information.


    profile for Eugene Astafiev at Stack Overflow, Q&A for professional and enthusiast programmers


    Monday, May 7, 2018 2:01 AM
  • Hi Michael,

    Have you resolved this issue?

    To check whether it is related with this Outlook or account, I would suggest you try to configure the specific account on the working computer, will this issue happen again?

    Best Regards,

    Tao Zhou


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 30, 2018 1:37 PM
  • Sorry for my late response.

    We had created a microsoft ticket and checked this problem with engineer Andrei Ghita.
    He found a workaround. Firstly call CopyProps and then to call GetProps on copyed buffer. His explanation was, that the servers exchange postbox must be corrupted. This is possible some times and known. Because outlook use his own code, it could the reason that outlook can transfer and corrected the item into local cache. That's also the reason that outlook can displaying the item and it is possible to GetProp on local cache.

    :/


    Sunday, January 6, 2019 10:55 AM