none
Problem reading my own contacts RRS feed

  • Question

  • Hi,

    I'm running into a strange issue that I just can't figure out.  I am connecting to my mailbox while logged on to my account.  I am able to use RopFastTransferSourceGetBuffer to retrieve messages, calendar items, tasks, and sticky notes just fine.  When I try to access my contacts, the calls to OpenFolder, RopFastTransferSourceCopyMessages, and RopFastTransferSourceGetBuffer all succeed, but the data stream only contains 0x400f0003 (PidTagEcWarning).  I understand that this means a permissions check has failed.  I'm not sure why though.  I can view/edit/delete contacts in Outlook just fine.  Here are the details of the process:

    1)  I am passing 0 for the admin flag in EcDoConnectEx.  I am also passing my user's ExchangeDN.
    2)  When I do a RopLogon, again I pass my ExchangeDN.  LogonFlags are 0x01 (Private Store) and OpenFlags are (TAKE_OWNERSHIP | NO_MAIL | USE_PER_MDB_REPLID_MAPPING)
    2)  I am parsing the entry id for the contact into a DATABASE_MESSAGE_ENTRYID and then calling RopIdFromLongTermId to get the correct FOLDER_ID and MESSAGE_ID values.
    3)  From there I open the folder (Contacts), prepare the FastTransfer buffer and retreive it.
    4)  There are no error codes returned at any point. 
    5)  There are no sharing permissions on the Contacts folder in Oulook.  Anonymous = None and Default = None.
    6)  My account is a Domain Admin.

    Again, my code has no problems downloading just any other object type in my mailbox.  It's only contacts that are failing.

    Thanks for any advice.
    Joe
    Saturday, February 7, 2009 11:31 PM

Answers

  • I'm on Exchange 2007 SP1 Rollup 5.  I'm not doing a sync, I just want to get a single contact.

    Below is the exact order of ROPs I use in my code:

    1.  RopLogon
    2.  I parse the EntryID for the contact I want to open
      2a.  RopIdFromLongTermId for the folder id
      2b.  RopIdFromLongTermId for the message id
    3.  OpenFolder
    4.  RopFastTransferSourceCopyMessages
    5.  RopFastTransferSourceGetBuffer
    6.  ReleaseObject - FTHandle
    7.  ReleaseObject - FolderHandle

    It appears that there was just something strange with my Exchange server.  It was rebooted yesterday and now I am able to access my contacts.  You can consider this closed.

    Thanks,
    Joe
    • Marked as answer by JoeDoyle23 Monday, February 9, 2009 6:41 PM
    Monday, February 9, 2009 6:41 PM

All replies

  • Hi Joe,

    I will look at this tommorrow in more detail.  There are a couple of paths that can return the PidTagEcWarning so I am going to have to ask development to see if they have any insight to what could be causing this.


    Developer Consultant
    Monday, February 9, 2009 4:55 AM
    Moderator
  • What is the sequence of ROPs you are using and what version of Exchange?

    For example the [MS-OXCSYNC] has the following sample sequence for download:

    <snippet>

    4.3.2  Download

    What follows is a sample conversation with the server. The user has previously modified a
    message on the server and has just connected to the server to synchronize the changes by
    using the partial item download flag.

    1. RopLogon – Open the store.
    2. RopOpenFolder – Open the folder being synchronized.
    3. RopSynchronizationConfigure – Open the contents download context by using the handle of the folder being synchronized. Specify the SendOptionPartialItem flag when using this ROP.
    4. RopSynchronizationUploadStateStreamBegin – Upload the ICS state idsetGiven by using the download context.
    5. RopSynchronizationUploadStateStreamContinue – Upload the ICS state idsetGiven by using the download context.
    6. RopSynchronizationUploadStateStreamEnd – Upload the ICS state idsetGiven by using the download context.
    7. RopSynchronizationUploadStateStreamBegin – Upload the ICS state cnsetSeen by using the download context.
    8. RopSynchronizationUploadStateStreamContinue – Upload the ICS state cnsetSeen by using the download context.
    9. RopSynchronizationUploadStateStreamEnd – Upload the ICS state cnsetSeen by using the download context.
    10. RopSynchronizationUploadStateStreamBegin – Upload the ICS state cnsetSeenFAI by using the download context.
    11. RopSynchronizationUploadStateStreamContinue – Upload the ICS state cnsetSeenFAI by using the download context.
    12. RopSynchronizationUploadStateStreamEnd – Upload the ICS state cnsetSeenFAI by using the download context.
    13. RopSynchronizationUploadStateStreamBegin – Upload the ICS state cnsetSeenRead by using the download context.
    14. RopSynchronizationUploadStateStreamContinue – Upload the ICS state cnsetSeenRead by using the download context.
    15. RopSynchronizationUploadStateStreamEnd – Upload the ICS state cnsetSeenRead by using the download context.
    16. RopFastTransferSourceGetBuffer – Receive the folder properties and updated ICS state by using the download context. These buffers will contain partial items as appropriate.
    17. RopRelease – Release the download context.
    18. RopRelease – Release the folder.
    19. RopRelease – Release the store.

    </snippet>


    Developer Consultant
    • Marked as answer by JoeDoyle23 Monday, February 9, 2009 6:41 PM
    • Unmarked as answer by JoeDoyle23 Monday, February 9, 2009 6:41 PM
    Monday, February 9, 2009 6:24 PM
    Moderator
  • I'm on Exchange 2007 SP1 Rollup 5.  I'm not doing a sync, I just want to get a single contact.

    Below is the exact order of ROPs I use in my code:

    1.  RopLogon
    2.  I parse the EntryID for the contact I want to open
      2a.  RopIdFromLongTermId for the folder id
      2b.  RopIdFromLongTermId for the message id
    3.  OpenFolder
    4.  RopFastTransferSourceCopyMessages
    5.  RopFastTransferSourceGetBuffer
    6.  ReleaseObject - FTHandle
    7.  ReleaseObject - FolderHandle

    It appears that there was just something strange with my Exchange server.  It was rebooted yesterday and now I am able to access my contacts.  You can consider this closed.

    Thanks,
    Joe
    • Marked as answer by JoeDoyle23 Monday, February 9, 2009 6:41 PM
    Monday, February 9, 2009 6:41 PM
  • No problem.  I was just using that as an example to understand the ROP sequencing.  Thanks!


    Developer Consultant
    Monday, February 9, 2009 6:44 PM
    Moderator