Solved

Problems using CDO from a service???

Posted on 2004-09-15
4
430 Views
Last Modified: 2008-02-01
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
Comment
Question by:klamerus
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 500 total points
ID: 12064559
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
 
LVL 1

Author Comment

by:klamerus
ID: 12065391
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
 
LVL 1

Author Comment

by:klamerus
ID: 12065458
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
 
LVL 1

Author Comment

by:klamerus
ID: 12110761
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question