0

I have an .Net 4.6 app processing mail from inbox. We are migrating an old windows server to a new one. The app runs interactively or via task scheduler. App is using Redemtpion 6.0, upgraded yesterday from v4.5.

On Windows Server 2008 R2 + Outlook 2013 runs OK. On Windows Server 2016 + Outlook 2016 runs OK. On Windows Server 2019 + Outlook 2019 runs interactively byt not via task scheduler. When executing GetDefaultFolder(olFolderInbox) an MAPI_E_NOT_FOUND exception is thrown and the program crashes. When the user is logged on the server, even disconected, the app run via task scheduler works.

I found a similar problem here Redemption: Error when using Task Scheduler. According to the comments it should not work via task scheduler, but it works on Windows Server 2016 with Outlook 2016.

TylerH
  • 20,799
  • 66
  • 75
  • 101
Ivan
  • 1
  • Please send a message to redemption@dimastr.com and I will send you the debug version of Redemption. – Dmitry Streblechenko Aug 27 '21 at 14:54
  • Does the `LoggedOn` property returns `true` on the problematic machine? Have you tried using the `Logon` method? What is your code? – Eugene Astafiev Aug 28 '21 at 17:04
  • @Eugene The code is like this: RDOSession redemptionSession = new RDOSessionClass(); redemptionSession.Logon(); RDOFolder redemptionInbox2 = redemptionSession.GetDefaultFolder(rdoDefaultFolders.olFolderInbox); so I am using the Logon method. I don't know about the LoggedOn property (now we are experimenting on the live server), but have the value of ExchangeConnectionMode property. When it works, the value is olOnline, when it does not it is olCachedConnectedFull or throws an exception MAPI_E_NOT_FOUND (old version of redemption.dll) – Ivan Aug 31 '21 at 12:01
  • Is it fixed now? – Eugene Astafiev Aug 31 '21 at 13:06
  • No, still no success. Tryed change ,,Logon()'' to ,,LogonHostedExchangeMailbox(...)'' but it does the same – Ivan Sep 02 '21 at 10:10
  • As of now, with the latest Redemption 6.1 the program works with ,,LogonHostedExchangeMailbox''. Dmitry was very helpful to find a solution – Ivan Oct 01 '21 at 15:37

0 Answers0