DCOM errors while running as domain user - scheduled task

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Olive

    #1

    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\use rname 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.Offic e.Interop.Word. Application
    objWord.Display Alerts = WdAlertLevel.wd AlertsNone
    objWord.Documen ts.Add() <------ Exception thrown on this line

    The exception message is:

    There is insufficient memory. Save the document now.

    at Microsoft.Offic e.Interop.Word. Documents.Add(O bject& Template, Object&
    NewTemplate, Object& DocumentType, Object& Visible)
    at AutomatedRetryL etters.Automate dRetryLetters.M ain() in
    AutomatedRetryL etters.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.


  • keith moran

    #2
    Re:DCOM errors while running as domain user - scheduled task

    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.

    Comment

    • James Delides

      #3
      Re:DCOM errors while running as domain user - scheduled task

      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:
      [color=blue]
      > 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.
      >[/color]

      Comment

      Working...