?
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
Medium Priority
?
855 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
12 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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 …
Integration Management Part 2
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

850 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