• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 442
  • Last Modified:

Problems using CDO from a service???

We have an application written in C/C++in Visual Studio 6 on Windows NT that send e-mail running as a service.  We have Outlook 2000 installed on the Windows NT server to get the CDO, which is the API we use to do this.

This all works fine, but we're in a migration project and we're running into issues.

We are migrating this as follows:

- New servers are Windows 2000
- New dev environment is Visual Studio .Net (but still C/C++)
- Still Outlook 2000

We're finding that we can run the program perfectly well from an interactive login, but it doesn't run as a service.  This all works perfectly well on WInNT, but not on WIndows 2000 (same code, same version of Outlook).  It keeps throwing a COM error that looks like:

14-Sep-2004 at 11:21:14 PM COM error!
14-Sep-2004 at 11:21:14 PM Code = 800406f9
14-Sep-2004 at 11:21:14 PM Code meaning = IDispatch error #1273
14-Sep-2004 at 11:21:14 PM Source = Collaboration Data Objects
14-Sep-2004 at 11:21:14 PM Description =  [Collaboration Data Objects - [MAPI_E_LOGON_FAILED(80040111)]]

Can anyone provide any insight into this?  It sounds like a logon failure, but we're not getting any more information beyond this?

Thanks,
Mark
0
Gene Klamerus
Asked:
Gene Klamerus
  • 3
1 Solution
 
jkrCommented:
Your problem is that services running under the 'LocalSystem' account have almost OS privileges, but are not allowed to use _any_ networking facilities. To overcome this, make sure to assign your service to run under a predefined user account (preferrably one belonging to the admin group) which does have network access (this is usually done by specifying an account name&password in the call to 'CreateService()', but you're also able to change this from the 'services' control panel applet).

Also check out http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B197820 ("How To MAPI Enable a Windows NT Service") - CDO and MAPI are not the same, but related.
0
 
Gene KlamerusTechnical ArchitectAuthor Commented:
We do already have this account defined to run under a privileged account.  Are there any privileges that are specifically critical or needed that we could be missing and any sort of list of those?
0
 
Gene KlamerusTechnical ArchitectAuthor Commented:
The thing about this is that we're doing this the same way as we did on NT, but it's not working on 2K (at least that's our opinion).
0
 
Gene KlamerusTechnical ArchitectAuthor Commented:
We have this service running under an account we can use to log on to the server and that we used to get into Outlook (also on the server), which is how we set up the profile.
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now