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
837 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
 

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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Round a string to two digits 12 32
VB.Net - CSV to Oracle table 4 52
vb.net checkbox 7 41
Get hold of longitude and latitude in iframe string 11 24
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
As a trusted technology advisor to your customers you are likely getting the daily question of, ‘should I put this in the cloud?’ As customer demands for cloud services increases, companies will see a shift from traditional buying patterns to new…

863 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now