|
|
|
date: Fri, 6 Jun 2008 02:54:42 -0700 (PDT),
group: microsoft.public.platformsdk.mapi
back
kerberos error when using mapi in a service
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
date: Fri, 6 Jun 2008 02:54:42 -0700 (PDT)
author: unknown
Re: kerberos error when using mapi in a service
How do you run it in the windows service? Are you using a timer or a
separate thread?
The problem is multithreading.
Follow my discussion, i got the same problem: MAPI in mutithreading
environments
Cosmin
wrote in message
news:661bcd11-4628-4aec-b04f-6b2d6080abe5@k37g2000hsf.googlegroups.com...
> 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
>
>
date: Fri, 6 Jun 2008 11:06:11 +0100
author: Cosmin Onea
|
|