By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,147 Members | 744 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,147 IT Pros & Developers. It's quick & easy.

DCOM errors while running as domain user - scheduled task

P: n/a
Hi guys,

I'm having a bit of a problem getting a VB .NET console app to run happily
as a scheduled task. The app itself generates a bunch of word documents on a
file share on another server by reading from a template file and inserting
text at bookmark locations (with details pulled from a table in the
database). I'm running the app under a regular domain account that isn't an
administrator on the server. The read/execute permissions are set on the
console app/directory just fine, and likewise for the export folder on the
file share on the other server.

Firstly, here's a bit of background on the problem and what I've tried so
far:

- Running the console app from a command prompt (logged in as the user with
a Start -> Run -> runas /user:DOMAIN\username cmd) results in the
application running just fine. It writes the files out to the share no
problems at all.
- Running the console app as a scheduled task (with the correct domain user
profile details) results in an "0xe0434f4d" error showing up in the task
scheduler, and the following error in the System event log (Event ID 10003):

Access denied attempting to launch a DCOM Server. The server is:
{000209FF-0000-0000-C000-000000000046}
The user is <username>/<domain>, SID=S-1-5-<etc...>

After this we edited the DCOM permissions by doing the following:

* Start -> Run -> dcomcnfg.exe
* Expand "Component Services"
* Expand "Computers"
* Right-click "My Computer" -> Properties
* Default COM security tab
* Edit both "Access Permissions" and "Launch Permissions", adding in the
user running the scheduled task in both sections.

This got rid of that DCOM error, and the scheduled task attempted to run.
Unfortunately now I faced a new error when the app tries to access the Word
object. The code in question is:

Dim objWord As New Microsoft.Office.Interop.Word.Application
objWord.DisplayAlerts = WdAlertLevel.wdAlertsNone
objWord.Documents.Add() <------ Exception thrown on this line

The exception message is:

There is insufficient memory. Save the document now.

at Microsoft.Office.Interop.Word.Documents.Add(Object & Template, Object&
NewTemplate, Object& DocumentType, Object& Visible)
at AutomatedRetryLetters.AutomatedRetryLetters.Main() in
AutomatedRetryLetters.vb:line 52

Needless to say, there's plenty of available memory. Also, if I add the
domain user as a local administrator on the machine it works without a
problem.

Does anyone have any suggestions as to what I could do next? I'm not keen on
leaving this account as an administrator on the box as it has no real need.
Jul 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
did you ever figure this one out on your own? I am having a very similar
problem and cannot find any help on the issue anywhere. Thanks.
Aug 11 '05 #2

P: n/a
The original post was actually made on my behalf, and no...no solution thus
far I'm afraid. Still running under a local admin account to keep it working
unfortunately.

- James

"keith moran" wrote:
did you ever figure this one out on your own? I am having a very similar
problem and cannot find any help on the issue anywhere. Thanks.

Aug 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.