473,386 Members | 1,702 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

DCOM errors while running as domain user - scheduled task

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
2 5814
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: exchange | last post by:
I'm running a VB.net exe which reads a xml document via a URL using the XmlDocument Load method under framework 1.1. It runs correctly via a scheduled task running as user admin who is a member of...
0
by: Erik Anderson | last post by:
There is a COM object (written in ATL) that I have been using for a little while (in scheduled events mostly) that I am very interested in getting to run inside of an ASP page. This site uses...
5
by: Sergey V | last post by:
Having following problem 1. Client: ASP application with anonymous access to be running as DOMAIN\my_user on WinXP 2. Server: DCOM NT Service runs on remote host (W2K Server) under the same...
12
by: Russ | last post by:
Hello. My new dev machine is running XP Pro. In the past all equipment has only used Windows 2000. I have had a lot of problems getting my projects up and running on the new machine. The current...
3
by: David Olive | last post by:
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...
4
by: RSH | last post by:
I have an application that creates an Access version of a SQL Server database and then it moves the resulting database to an ftp server for the client to download and run reports against etc. The...
2
by: mscurto | last post by:
Is there a way to set up access to open and run a query in a particular database at a particular time each day? This would be run from a Windows 2000 desktop.
6
by: Mantorok | last post by:
Hi all I have a console application that runs every night via a scheduled task, there is a try-catch block in my Main class, whenever an error is caught it is written to a log file and then...
2
by: kplkumar | last post by:
Hi all I am fairly new to windows scheduler. I have an .exe console application that needs to be run 1st of every month. I created a scheduled task in Windows Schduler and called the .exe. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.