Solved

Problems using CDO from a service???

Posted on 2004-09-15
4
425 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
  • 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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
website 1 297
Update a root certificate 8 622
Problems executing VBS script in Windows 2000 16 152
Install Window 2012 Domain on 9 125
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…
Use of TCL script on Cisco devices:  - create file and merge it with running configuration to apply configuration changes
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now