Solved

Retrieving the COM class factory for component with CLSID {000209FF-0000-0000-C000-000000000046} failed due to the following error: 80070005.

Posted on 2011-02-17
14
839 Views
Last Modified: 2012-08-14
I have an application that should run on a remote server as a scheduled task.  The application fails with the above error message.  However, if I execute the application manually, it runs smoothly.  No problems.  

All the resolutions I have found relate to ASP.net applications.  Including those I have found in Experts Exhange.  My application has no UI.  It just needs to run at a specified time.  

The application builds word documents then saves them to a location on another server.  I've determined the program fails when I identify the path and folder to where the letters need to be stored.
0
Comment
Question by:bgernon
  • 6
  • 5
14 Comments
 
LVL 3

Expert Comment

by:pasolo
ID: 34920726
This appears to be a permissions issue related to the account under which the scheduled task is running.
But have a look at the Scheduled Tasks log file
0
 

Author Comment

by:bgernon
ID: 34921036
Where is the log?  I'm new to this scheduler.  I've been poking around trying to find it.
0
 
LVL 3

Expert Comment

by:pasolo
ID: 34921216

On XP look for Schedlgu.txt in the Windows folder.
On Windows 7 Task Scheduler can be viewed by opening the task properties and clicking on the History tab
0
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

Author Comment

by:bgernon
ID: 34921964
No, nothing there.  The scheduler thinks it completed the task successfully.  I have the program email errors to me.  I catch the error, then have it emailed to me.  So as far as the scheduler goes, it thinks it did it's job.
0
 
LVL 3

Expert Comment

by:pasolo
ID: 34923790
As I said it appears like a permission issue.
When the task runs under you account, that is when it runs manually, there are no problems as you say.
If the task run under another user account it has no access to your CURRENT_USER Registry where you might have saved configuration settings. Or the task may be trying to save to a folder where it has no wrtting permissions..It may also be a problem related to relative paths, test with absolute paths and see if it works.
0
 

Author Comment

by:bgernon
ID: 34928029
The path is absolute.  

Are you saying that when the task runs, it is using a different user account than my own?  When I set up the task, it is using my user account.
0
 

Accepted Solution

by:
bgernon earned 0 total points
ID: 34982614
The fix is to open up Component Services\Computers\My Computer\DCOM Config. Right click Microsoft Office Word and select properties.  Select the Identity tab.  Select This User button, then put either your user ID or Administrator, then password.
0
 
LVL 3

Expert Comment

by:pasolo
ID: 34983405
You have not found the solution, you have been leaad to the solution
0
 

Author Comment

by:bgernon
ID: 34983523
0
 
LVL 3

Expert Comment

by:pasolo
ID: 34986257
When you came here you had no clue, even to search google about the issue.
I gave you all the information you needed.
You showed surprise in these terms?
"Are you saying that when the task runs, it is using a different user account than my own? "
Then you searched google with my input and you got the specific answer you were looking for.
The answer was:
"Select the Identity tab.  Select This User button, then put either your user ID or Administrator, then password"
But you thought you have found the solution and decided to close the question even without a thank you.
Pity
0
 
LVL 3

Expert Comment

by:pasolo
ID: 34988195
All my comments state it is a permission issue, and I clearly said:
"When the task runs under you account, that is when it runs manually, there are no problems as you say. If the task run under another user account it has no access to your CURRENT_USER Registry where you might have saved configuration settings"

I don't find what bgernon considers the solution a good solution (according to programming good practices) for the simple reason that according to Microsoft
http://support.microsoft.com/kb/257757/
"Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment"

Even if the solution satisfies bgernon, he has arrived at it after the discussion here and all hints I provided are actually part of the solution that satisfies him, namely that the problem is caused by the task not running always under the same account and then can not access the Registry settings where the path is stored when running under a different account.




0
 

Expert Comment

by:South Mod
ID: 35067627
All,
 
Following an 'Objection' by bgernon (at http://www.experts-exchange.com/Q_26856643.html) to the intended closure of this question, it has been reviewed by at least one Moderator and is being closed as recommended by the Expert.
 
At this point I am going to re-start the auto-close procedure.
 
Thank you,
 
SouthMod
Community Support Moderator
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
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…

770 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