Exchange folder and cached folder in OST file not in sync

Discussion in 'Microsoft Outlook Program Addins' started by Michael, Feb 5, 2008.

  1. Michael

    Michael Guest

    We have written a server application that periodically accesses
    certain folders in Exchange user's mailboxes (for which the server has
    permission) and moves the messages to the Deleted Items folder. The
    application is a service running on Windows XP or Server 2003. It is
    written in C# and uses the RDO methods in Redemption.dll to operate on
    the folders and items.

    This process usually goes smoothly, but every once in a while it looks
    like the application does not move some of the messages. Upon further
    inspection, the messages have been moved out of the folder, but the
    OST file does not reflect the change. If we look at the
    Synchronization tab in the Properties dialog for the folder (Outlook
    2007, in this case), the "Server folder contains:" value is different
    than the "Offline folder contains:" value.

    If we use the Scan OST tool from Microsoft, it repairs the problem.
    If we use the "Clear Offline Items" button on the General tab of the
    folder Properties, that also seems to fix the problem.

    My first question is whether or not I can prevent this situation from
    occurring, or is this some form of OST corruption as a result of
    another process moving messages?

    We also have an Outlook add-in on the client, so if we could figure
    out a way to repair the problem programmatically, that would be a
    reasonable workaround. I tried the ExchangeSynchronizer /
    RDOFolderSynchronizer, but that did not help. I also tried adding
    these folders to the Send/Receive group, and that did not work
    either. Is there any way to get the Offline and Exchange folder in
    sync programmatically? Any help would be appreciated.

    Michael
     
    Michael, Feb 5, 2008
    #1
    1. Advertisements

  2. Is your service running against an existing profile (RDOSession.Logon) that
    uses cached mode (OST) or against an online store returned by a dynamic
    profile (RDOSession.LogonExchangeMailbox)?
    What is the Outlook version? If you need a service grade version of MAPI,
    use the standlaone version. If you absolutely need to have Outlook
    installed, use Outlook 2002 SP3.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/
    OutlookSpy - Outlook, CDO
    and MAPI Developer Tool

    "Michael" <> wrote in message
    news:...
    > We have written a server application that periodically accesses
    > certain folders in Exchange user's mailboxes (for which the server has
    > permission) and moves the messages to the Deleted Items folder. The
    > application is a service running on Windows XP or Server 2003. It is
    > written in C# and uses the RDO methods in Redemption.dll to operate on
    > the folders and items.
    >
    > This process usually goes smoothly, but every once in a while it looks
    > like the application does not move some of the messages. Upon further
    > inspection, the messages have been moved out of the folder, but the
    > OST file does not reflect the change. If we look at the
    > Synchronization tab in the Properties dialog for the folder (Outlook
    > 2007, in this case), the "Server folder contains:" value is different
    > than the "Offline folder contains:" value.
    >
    > If we use the Scan OST tool from Microsoft, it repairs the problem.
    > If we use the "Clear Offline Items" button on the General tab of the
    > folder Properties, that also seems to fix the problem.
    >
    > My first question is whether or not I can prevent this situation from
    > occurring, or is this some form of OST corruption as a result of
    > another process moving messages?
    >
    > We also have an Outlook add-in on the client, so if we could figure
    > out a way to repair the problem programmatically, that would be a
    > reasonable workaround. I tried the ExchangeSynchronizer /
    > RDOFolderSynchronizer, but that did not help. I also tried adding
    > these folders to the Send/Receive group, and that did not work
    > either. Is there any way to get the Offline and Exchange folder in
    > sync programmatically? Any help would be appreciated.
    >
    > Michael
     
    Dmitry Streblechenko, Feb 5, 2008
    #2
    1. Advertisements

  3. Michael

    Michael Guest

    The Outlook version we have been testing on the server is 2007
    (12.0.6212.1000), though we also use Outlook 2003 (with service
    packs). We are logging into the default profile for the account that
    the service is running (RDOSession.Logon), and that profile is set up
    in the default Cached Exchange Mode. It is always an Exchange
    account. The Exchange version is 6.5.7651.61.

    The user's mailbox folders have the appropriate permissions so that
    the server can access necessary folders. I use the
    RDOSession.GetSharedDefaultFolder() method to get the Inbox and then
    find the other folders relative to that one.

    After the server processes all the users, calls RDOSession.Logoff(),
    releases the last COM objects (it does that all along too), collects
    garbage a few times, and sleeps for a while before it logs in again to
    do work.

    Michael

    On Feb 5, 6:58 pm, "Dmitry Streblechenko" <> wrote:
    > Is your service running against an existing profile (RDOSession.Logon) that
    > uses cached mode (OST) or against an online store returned by a dynamic
    > profile (RDOSession.LogonExchangeMailbox)?
    > What is the Outlook version? If you need a service grade version of MAPI,
    > use the standlaone version. If you absolutely need to have Outlook
    > installed, use Outlook 2002 SP3.
    >
    > Dmitry Streblechenko (MVP)http://www.dimastr.com/
    > OutlookSpy  - Outlook, CDO
    > and MAPI Developer Tool
    >
    > "Michael" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > We have written a server application that periodically accesses
    > > certain folders in Exchange user's mailboxes (for which the server has
    > > permission) and moves the messages to the Deleted Items folder.  The
    > > application is a service running on Windows XP or Server 2003.  It is
    > > written in C# and uses the RDO methods in Redemption.dll to operate on
    > > the folders and items.

    >
    > > This process usually goes smoothly, but every once in a while it looks
    > > like the application does not move some of the messages.  Upon further
    > > inspection, the messages have been moved out of the folder, but the
    > > OST file does not reflect the change.  If we look at the
    > > Synchronization tab in the Properties dialog for the folder (Outlook
    > > 2007, in this case), the "Server folder contains:" value is different
    > > than the "Offline folder contains:" value.

    >
    > > If we use the Scan OST tool from Microsoft, it repairs the problem.
    > > If we use the "Clear Offline Items" button on the General tab of the
    > > folder Properties, that also seems to fix the problem.

    >
    > > My first question is whether or not I can prevent this situation from
    > > occurring, or is this some form of OST corruption as a result of
    > > another process moving messages?

    >
    > > We also have an Outlook add-in on the client, so if we could figure
    > > out a way to repair the problem programmatically, that would be a
    > > reasonable workaround.  I tried the ExchangeSynchronizer /
    > > RDOFolderSynchronizer, but that did not help.  I also tried adding
    > > these folders to the Send/Receive group, and that did not work
    > > either.  Is there any way to get the Offline and Exchange folder in
    > > sync programmatically?  Any help would be appreciated.

    >
    > > Michael- Hide quoted text -

    >
    > - Show quoted text -
     
    Michael, Feb 6, 2008
    #3
  4. Firstly, try to use LogonExchangeMailbox instead of Logon to make sure you
    are always in the online mode.
    Secondly, try to keep the same RDOSession object alive at all times rather
    than recreating it.
    Thirdly, try to use the standalone version of MAPI.

    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/
    OutlookSpy - Outlook, CDO
    and MAPI Developer Tool

    "Michael" <> wrote in message
    news:...
    The Outlook version we have been testing on the server is 2007
    (12.0.6212.1000), though we also use Outlook 2003 (with service
    packs). We are logging into the default profile for the account that
    the service is running (RDOSession.Logon), and that profile is set up
    in the default Cached Exchange Mode. It is always an Exchange
    account. The Exchange version is 6.5.7651.61.

    The user's mailbox folders have the appropriate permissions so that
    the server can access necessary folders. I use the
    RDOSession.GetSharedDefaultFolder() method to get the Inbox and then
    find the other folders relative to that one.

    After the server processes all the users, calls RDOSession.Logoff(),
    releases the last COM objects (it does that all along too), collects
    garbage a few times, and sleeps for a while before it logs in again to
    do work.

    Michael

    On Feb 5, 6:58 pm, "Dmitry Streblechenko" <> wrote:
    > Is your service running against an existing profile (RDOSession.Logon)
    > that
    > uses cached mode (OST) or against an online store returned by a dynamic
    > profile (RDOSession.LogonExchangeMailbox)?
    > What is the Outlook version? If you need a service grade version of MAPI,
    > use the standlaone version. If you absolutely need to have Outlook
    > installed, use Outlook 2002 SP3.
    >
    > Dmitry Streblechenko (MVP)http://www.dimastr.com/
    > OutlookSpy - Outlook, CDO
    > and MAPI Developer Tool
    >
    > "Michael" <> wrote in message
    >
    > news:...
    >
    >
    >
    > > We have written a server application that periodically accesses
    > > certain folders in Exchange user's mailboxes (for which the server has
    > > permission) and moves the messages to the Deleted Items folder. The
    > > application is a service running on Windows XP or Server 2003. It is
    > > written in C# and uses the RDO methods in Redemption.dll to operate on
    > > the folders and items.

    >
    > > This process usually goes smoothly, but every once in a while it looks
    > > like the application does not move some of the messages. Upon further
    > > inspection, the messages have been moved out of the folder, but the
    > > OST file does not reflect the change. If we look at the
    > > Synchronization tab in the Properties dialog for the folder (Outlook
    > > 2007, in this case), the "Server folder contains:" value is different
    > > than the "Offline folder contains:" value.

    >
    > > If we use the Scan OST tool from Microsoft, it repairs the problem.
    > > If we use the "Clear Offline Items" button on the General tab of the
    > > folder Properties, that also seems to fix the problem.

    >
    > > My first question is whether or not I can prevent this situation from
    > > occurring, or is this some form of OST corruption as a result of
    > > another process moving messages?

    >
    > > We also have an Outlook add-in on the client, so if we could figure
    > > out a way to repair the problem programmatically, that would be a
    > > reasonable workaround. I tried the ExchangeSynchronizer /
    > > RDOFolderSynchronizer, but that did not help. I also tried adding
    > > these folders to the Send/Receive group, and that did not work
    > > either. Is there any way to get the Offline and Exchange folder in
    > > sync programmatically? Any help would be appreciated.

    >
    > > Michael- Hide quoted text -

    >
    > - Show quoted text -
     
    Dmitry Streblechenko, Feb 6, 2008
    #4
  5. Michael

    movesost

    Joined:
    Dec 10, 2011
    Messages:
    1
    Likes Received:
    0
    Office 2007 OST Repair application is a powerful tool to convert OST damage file into PST file. It works on corruption. OST recovery tool get corruption due to some reason virus attack on the OST file, bulk of data send in one time, any hard disk crash, or any user fault like suddenly system shut down and some other reason for more info:- http://www.freeosttopst.net/
     
    movesost, Dec 10, 2011
    #5
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page