MAPI_E_LOGON_FAILED from a Windows NT Service 
Author Message
 MAPI_E_LOGON_FAILED from a Windows NT Service

I'm reposting this since i haven't gotten any answers yet, and have som more
info

We have 4 different installations of the same service.
All are Win2000 Server machines
Machine A has Exchange 2k and works flawlessly
Machine B has Exchange 5.5 and also works flawlessly
Machine D has Exchange 2k and fails
Machine C has Exhcange 5.5 and fails

All machines has the service running as a user created for the service who
is member only of a group created for this user
The user/group has been given service account or similar to all mailboxes on
the machine it is installed.

If the console version of the service is run on C and D, logged in as the
service user, everything works great, as soon as
we try as a service it fails.

the code at the moment is simply (written in C#):

m_session = new Mapi.Session()
prf = server +"\n"+ mailbox
m_session.Logon(Missing.Value,Missing.Value,false,true,0,true,prf);

We have also tried
1. generating profiles through a managed c++ class with the use of
IProfAdmin
2. running the console version from the service
3. running the console version from the service imporsonating the system
user.

All with the same result.

thx in advance

Haakon Johannessen



Mon, 23 May 2005 23:04:06 GMT  
 MAPI_E_LOGON_FAILED from a Windows NT Service
Haakon,

Quote:
> We have 4 different installations of the same service.
> All are Win2000 Server machines
> Machine A has Exchange 2k and works flawlessly
> Machine B has Exchange 5.5 and also works flawlessly
> Machine D has Exchange 2k and fails
> Machine C has Exhcange 5.5 and fails

> All machines has the service running as a user created for the service who
> is member only of a group created for this user
> The user/group has been given service account or similar to all mailboxes
on
> the machine it is installed.

> If the console version of the service is run on C and D, logged in as the
> service user, everything works great, as soon as
> we try as a service it fails.

> the code at the moment is simply (written in C#):

> m_session = new Mapi.Session()
> prf = server +"\n"+ mailbox
> m_session.Logon(Missing.Value,Missing.Value,false,true,0,true,prf);

> We have also tried
> 1. generating profiles through a managed c++ class with the use of
> IProfAdmin
> 2. running the console version from the service
> 3. running the console version from the service imporsonating the system
> user.

> All with the same result.

Ok, I recommend that you find another application that does the same type of
logon and run that on the computers.  This should verify that the problem is
in the "C# service" and not the networking/administration of the two
machines that is failing.

Hope that helps.

Regards,

Randy



Mon, 23 May 2005 23:33:30 GMT  
 MAPI_E_LOGON_FAILED from a Windows NT Service
Do the machines failing happen to have Office XP installed ?
If so, see this KB:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q329295



Quote:
> Haakon,

> > We have 4 different installations of the same service.
> > All are Win2000 Server machines
> > Machine A has Exchange 2k and works flawlessly
> > Machine B has Exchange 5.5 and also works flawlessly
> > Machine D has Exchange 2k and fails
> > Machine C has Exhcange 5.5 and fails

> > All machines has the service running as a user created for the service
who
> > is member only of a group created for this user
> > The user/group has been given service account or similar to all
mailboxes
> on
> > the machine it is installed.

> > If the console version of the service is run on C and D, logged in as
the
> > service user, everything works great, as soon as
> > we try as a service it fails.

> > the code at the moment is simply (written in C#):

> > m_session = new Mapi.Session()
> > prf = server +"\n"+ mailbox
> > m_session.Logon(Missing.Value,Missing.Value,false,true,0,true,prf);

> > We have also tried
> > 1. generating profiles through a managed c++ class with the use of
> > IProfAdmin
> > 2. running the console version from the service
> > 3. running the console version from the service imporsonating the system
> > user.

> > All with the same result.

> Ok, I recommend that you find another application that does the same type
of
> logon and run that on the computers.  This should verify that the problem
is
> in the "C# service" and not the networking/administration of the two
> machines that is failing.

> Hope that helps.

> Regards,

> Randy



Sun, 29 May 2005 07:05:16 GMT  
 MAPI_E_LOGON_FAILED from a Windows NT Service
No. No outlook version is installed on the server. This would have
overwritten the cdo.dll so we have been careful to avoid that.


Quote:
> Do the machines failing happen to have Office XP installed ?
> If so, see this KB:
> http://support.microsoft.com/default.aspx?scid=kb;en-us;Q329295



> > Haakon,

> > > We have 4 different installations of the same service.
> > > All are Win2000 Server machines
> > > Machine A has Exchange 2k and works flawlessly
> > > Machine B has Exchange 5.5 and also works flawlessly
> > > Machine D has Exchange 2k and fails
> > > Machine C has Exhcange 5.5 and fails

> > > All machines has the service running as a user created for the service
> who
> > > is member only of a group created for this user
> > > The user/group has been given service account or similar to all
> mailboxes
> > on
> > > the machine it is installed.

> > > If the console version of the service is run on C and D, logged in as
> the
> > > service user, everything works great, as soon as
> > > we try as a service it fails.

> > > the code at the moment is simply (written in C#):

> > > m_session = new Mapi.Session()
> > > prf = server +"\n"+ mailbox
> > > m_session.Logon(Missing.Value,Missing.Value,false,true,0,true,prf);

> > > We have also tried
> > > 1. generating profiles through a managed c++ class with the use of
> > > IProfAdmin
> > > 2. running the console version from the service
> > > 3. running the console version from the service imporsonating the
system
> > > user.

> > > All with the same result.

> > Ok, I recommend that you find another application that does the same
type
> of
> > logon and run that on the computers.  This should verify that the
problem
> is
> > in the "C# service" and not the networking/administration of the two
> > machines that is failing.

> > Hope that helps.

> > Regards,

> > Randy



Sun, 29 May 2005 18:56:33 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. nt service(windows service)

2. nt service (windows service)

3. Create a Windows proc failure in a service App of Windows NT

4. Remote startup of NT Services from another NT Service

5. How to debug windows nt services

6. Writing a Service for Windows 2000/NT

7. Windows NT Service Pack 4 Debug Symbols

8. Debugging a Windows NT Service

9. Windows NT Services...

10. Windows NT Service Programs...

11. Debugging a Windows NT Service

12. Sockets in a Windows NT Service

 

 
Powered by phpBB® Forum Software