1

Hi I have a strange problem and am unable to find out the root cause. We build and deployed our application using Redemption things were working fine but suddenly the installation on UAT server has stopped working. But the same is working in production(Thank God).

Our application is of console based and written using .NET 3.5 its not totally down, it is working but when we try to run the same application via scheduler task it didn't work, but when we double click the exe file it works properly, successfully connect to Exchange reads and download the files as per our business logic but not executing when we try to run under scheduler task.

below is small error info might be helpful for you..

2012-06-15 16:05:06,724 EmailProcess.Program - message = Error in IMAPISession::OpenMsgStore: MAPI_E_FAILONEPROVIDER ulVersion: 0 Error: Microsoft Exchange is not available. Either there are network problems or the Exchange computer is down for maintenance. Component: Microsoft Exchange Information Store ulLowLevelError: 2147746069 ulContext: 1318

Please suggest

Edit 1: More info Windows 2008 Server, a user named SpecialTasksUser is configured on the server to login and has admin rights. Outlook is installed and profile is configured for different user name OutlookSpecialUser, when we login using SpecialTasksUser user and launch the outlook it loads and shows the inbox and private folders...so far so good.

We created the scheduled task and configured to run under user name SpecialTasksUser because this user has admin rights and this is where it gives error. On the other hand, when we go to installation directory and double click the *.exe file the application works and redemption successuflly reads the email and does what it is suppose to do...please help I hope this information would be helpful .....

Shax
  • 4,207
  • 10
  • 46
  • 62

1 Answers1

1

Most likely you are using a wrong parent identity of your process - scheduler runs under its own account by default. Make sure you specify the right Windows account.

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
  • what do you mean by parent identity. Are you talking about the Identity which I am using to run the scheduled task. Actually we have a speical user created for this and it has admin rights on the server to run the process. When I am logging into the server using this same account and running the same application by double clicking it, the app works successfully as mentioned earlier, but when I create a schedule task using the same user account and try to run, it gives error. please help.... – Shax Jun 15 '12 at 21:27
  • But the identity of the user who runs the process does not match the identity of the primary mailbox owner the profile, right? – Dmitry Streblechenko Jun 16 '12 at 17:55
  • Yes you are right both are different users and this scenario is working in Production currently and was also working in UAT box earlier but suddenly it stopped now. – Shax Jun 16 '12 at 18:18
  • That's the problem with impersonation and identity mismatch in MAPI - it might appear to work normally, but can break at any moment. Make sure your code is running under the identity of the mailbox owner. If oy uneed to open anoter mailbox, use RDOSession.GetSharedMailbox. – Dmitry Streblechenko Jun 16 '12 at 18:52