1
votes

We are accessing outlook through redemption DLL in c#.net. We are using various services like: importing contacts, calendar integration etc. Sometime we are getting exception from redemption COM like:

   The file abc.ost is in use and cannot be accessed.
   'MyApplication' exited without properly closing your Outlook data file

Could somebody help us to identify the root cause of this issue?

Exception details are mentioned below:

Exception1:

OutlookServices.OutlookService - System.Runtime.InteropServices.COMException (0x80040119): Error in IMAPISession.OpenEntry: MAPI_E_EXTENDED_ERROR

Error: 'MyApplication' exited without properly closing your Outlook data file 'C:\Users\abc\AppData\Local\Microsoft\Outlook\[email protected]'. 'MyApplication' must be restarted. If this error message recurs, contact support for 'MyApplication' for assistance.

at Interop.Redemption.IRDOSession.GetMessageFromID(String EntryIDMessage, Object EntryIDStore, Object Flags)


Exception2:

OutlookService - System.Runtime.InteropServices.COMException (0x8004011D): Error in IMAPISession::OpenMsgStore: MAPI_E_FAILONEPROVIDER

Error: The file C:\Users\abc\AppData\Local\Microsoft\Outlook\[email protected] - abc.ost is in use and cannot be accessed. Close any application that is using this file, and then try again. You might need to restart your computer.

at Interop.Redemption.IRDOSession.GetDefaultFolder(rdoDefaultFolders FolderType)

1
Redemption is a proprietary commercial software. I'd recommend contacting the Redemption developer at dimastr.com/redemption/contact.htm instead. - Eugene Astafiev
This question is tagged as "outlook-redemption". It is perfectly fine to ask Redemption questions here. - Dmitry Streblechenko
I wonder if another application might be running that is holding open the OST file? I found that Skype (formerly Lync) for business was holding the OST open. I closed lync and then the error stopped happening. I should say I got the error as shown in Exception1 above from the MSOutlook client after it had terminated abnormally... I'm not using redemption. - Peter Smallwood

1 Answers

1
votes
  1. Are you sure your application was terminated gracefully? Do you release Redemption objects as soon as you are done with them?
  2. Are both your app and Outlook running in the same security context? Is either app running with elevated privileges (Run As Administrator)? Normally, OST files can be shared between different processes (e.g. outlook and your process) as long as the security contexts are the same.