Discussion:
kerberos error when using mapi in a service
(too old to reply)
a***@gmail.com
2008-06-06 07:36:27 UTC
Permalink
Hi,

I have a program (c#) that can run as a service or as a console
application.

It uses mapi to log on to the mailserver:

SessionPtr = new MAPI.Session();
string ProfileInfo = MailboxServer + "\n" + MailboxName;
SessionPtr.Logon(
MissingValue, //ProfileName
MissingValue, //ProfilePwd
false, //ShowDialog
true, //NewSession
MissingValue, //ParentWindow
MissingValue, //NoMail
ProfileInfo //Server and Mailbox
);

When running as a console application it runs perfect, but when
running as a service, we get the error :
The information store could not be opened. [MAPI 1.0 -
[MAPI_E_LOGON_FAILED(80040111)]]

At the same time we get a kerberos error in the system log:

The kerberos client received a KRB_AP_ERR_MODIFIED error from the
server xyz. This indicates that the password used to encrypt the
kerberos service ticket is different than that on the target server.
Commonly, this is due to identically named machine accounts in the
target realm (EMEA.SYSTEMS.LOCAL), and the client realm. Please
contact your system administrator.

The service runs with the same user as the console application.

What can be wrong?

Thanks,
Alex
Ashutosh Bhawasinka
2008-06-10 07:14:11 UTC
Permalink
Try passing MAPI_NT_SERVICE flag!!

also see this
http://support.microsoft.com/default.aspx/kb/197820

Regards,
Ashutosh Bhawasinka
Post by a***@gmail.com
Hi,
I have a program (c#) that can run as a service or as a console
application.
SessionPtr = new MAPI.Session();
string ProfileInfo = MailboxServer + "\n" + MailboxName;
SessionPtr.Logon(
MissingValue, //ProfileName
MissingValue, //ProfilePwd
false, //ShowDialog
true, //NewSession
MissingValue, //ParentWindow
MissingValue, //NoMail
ProfileInfo //Server and Mailbox
);
When running as a console application it runs perfect, but when
The information store could not be opened. [MAPI 1.0 -
[MAPI_E_LOGON_FAILED(80040111)]]
The kerberos client received a KRB_AP_ERR_MODIFIED error from the
server xyz. This indicates that the password used to encrypt the
kerberos service ticket is different than that on the target server.
Commonly, this is due to identically named machine accounts in the
target realm (EMEA.SYSTEMS.LOCAL), and the client realm. Please
contact your system administrator.
The service runs with the same user as the console application.
What can be wrong?
Thanks,
Alex
Loading...