1
votes

I'm using Outlook Redemption for Exchange mails access. for this developing windows service... But I'm getting error when outlook connecting.

OS: Windows 7 64 bit Outlook: 2010 32 bit Outlook Redemption Version: 5.7 Developing Platform Target: x86

I'm using this code:

this.rdoSession = new Redemption.RDOSessionClass();
this.rdoSession.Logon(this.config.MailConfig.Username, this.config.MailConfig.Password, false, false, 0, false);

And exception detail:


Error in MAPILogonEx: MAPI_E_LOGON_FAILED

Make sure your code runs under the Windows user identity that has MAPI profiles.

When running in a service (including ASP under IIS), set your code to run under

the Windows user account that has MAPI profiles.

When connecting to an Exchange Server, you can also use RDOSession.LogonExchangeMailbox

which does not require an existing profile.


Why getting this error? Any ideas?

Thank you!

1

1 Answers

1
votes

Is your service running under the identity of a local user who has the specified profile (as seen in Control Panel | Mail | Show Profiles)?

Keep in mind that RDOSession.Logon takes the name of a profile, not a user name. If you are trying to connect to a particular Exchange mailbox, use RDOSession.LogonExchangeMailbox (Exchange 2000 - 2010) or RDOSession.LogonHostedExchangeMailbox (Exchange 2010 - 2013).