COM class factory error: 8000401a.
-
Thursday, April 09, 2009 8:46 PMHello
I have been trying to solve this problem since many days. I created charts on my web page using chart control and then saved those charts in temp folder. I want to export thses charts to excel file . The good thing is , I was able to that on my local machine.
But whenh I put the same code in server 2003 , I start getting error :
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 8000401a.
on this line:
xlApp = new Excel.ApplicationClass();
I think I have tried every solution avaialable but seems I am still missing on something. Can someone please help me step by step to follow some tutorial. I know this perms problem , but where I dont know..
Please help ?
Thanks
Varun
All Replies
-
Thursday, April 09, 2009 9:41 PMDoes the server 2003 machine have the excel assemblies in its GAC?
-
Thursday, April 09, 2009 11:48 PM
I have no idea how to check that ? Can you please let me know ... I really appreciate it
Thanks
varun -
Friday, April 10, 2009 1:23 AMThere GAC viewers.
AlexB -
Friday, April 10, 2009 1:31 AM
The Global Assembly Cache tool allows you to view and manipulate the contents of the global assembly cache and download cache: Gacutil.exe
AlexB -
Friday, April 10, 2009 1:33 AM8000401a means:
The server process could not be started because the configured identity is incorrect. Check the username and password.
AlexB -
Friday, April 10, 2009 1:36 AMis there any specific excel assembly name that I should check in c:\windows\assembly ?
Thanks
Varun -
Friday, April 10, 2009 2:43 AMI just checked in this folder and i can see microsoft.office.interop.excel in it... Is there any other that I should be looking here ?
Thanks
Varun -
Monday, April 13, 2009 3:35 AMAny help ?
-
Monday, April 13, 2009 4:16 AMHi Varun,
THis is due to that reason that it is not able to create the COM object fo excel.
Is it registered properly in the machine? Go to registry and check path - "HKEY_CLASSES_ROOT\CLSID\{00024500-0000-0000-C000-000000000046}".
If is it exists, try below vb script ("Excel.Application.12" is the value in "HKEY_CLASSES_ROOT\CLSID\{00024500-0000-0000-C000-000000000046}\ProgID")
CreateObject("Excel.Application.12")
Is the office properly registered for all users?
Thanks
PKR -
Monday, April 13, 2009 8:22 PMMany thanks for replying back to this thread!!
I check at the locations in registry as guided by you...
HKEY_CLASSES_ROOT\CLSID\{00024500-0000-0000-C000-000000000046}\ProgID" is having Excel.Application.11
I think I should uninstall office 2003 and put office 2007 as the same code on my developemnt machine works where i have office 2007 ?
Any suggestions on that ?
Thanks
Varun -
Tuesday, April 14, 2009 10:26 AM
Hi Varun,
It should be the permissions problem.
Please have a try using the following steps to Configure DCOM:
1. Go to the Start-Run menu to type in "dcomcnfg" and hit enter to load "Component Services" MMC.
2. Select the "Microsoft Excel Application" item through "Component Services" MMC->Component Services->Computers->My Computer->DCOM Config->Microsoft Excel Application
3. Right click and select Properties->Select Identity Tab->Select This user and add the Administrator accout and password
4. Select Security Tab, Under "Launch and Activation Permissions", Choose "Customize", Click "Edit" button, Add the everyone account and add all the Permissions.
5. Do the same thing in "Access Permissions" and "Configuration Permissions"
Best regards,
Guo
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.- Proposed As Answer by kreativekai Tuesday, April 26, 2011 12:23 PM
-
Tuesday, April 14, 2009 2:08 PMHi Varun,
Did CreateObject in vbscript work?
Thanks
PKR -
Tuesday, April 14, 2009 4:43 PMHello GUO
I have tried all those settings :
Currently it is set to Launching User , but even if I change to admin user and password:
It gives me:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80080005
Hey Vic
CReateObject in VBScript ? what does that mean .... Please tell me how can I test that ?
Thanks
Varun -
Wednesday, April 15, 2009 12:16 AM
Probably there is no such class in the COM server. You'll have to download and install the SDK that controls it.
AlexB- Proposed As Answer by Guo Surfer Friday, April 17, 2009 2:40 AM
-
Wednesday, April 15, 2009 3:41 AMHi Varun,
Create a VbScript (call a.vbs). Then add CreateObject("Excel.Application.11") in the file. Double click the file.
Also, Which OS are you using?
Regards
PKR -
Tuesday, April 26, 2011 12:24 PMThanks Guo! This worked to fix this problem for me on Windows Server 2008! Thanks again!
Lost in the Vast Sea of .NET -
Tuesday, June 21, 2011 11:04 AM
Thanks Guo.
It worked !!!!
-
Monday, September 19, 2011 7:22 AMThanks Its working fine For this i strugled so much .
-
Thursday, September 29, 2011 6:21 AMThanks Guo.. I have the same issue and the above configuration solved the issues in Windows 2008 R2 Server .
-
Friday, February 24, 2012 4:45 AM
Hi Guo,
Thank and it works in my Windows 2008 R2 and IIS server.
Thanks
Pathiraja Dissanayaka.
-
Sunday, March 11, 2012 6:01 AM
Error : Retrieving the COM
class factory for component with CLSID {00024500-0000-0000-C000-000000000046}
failed due to the following error: 8000401a.it should be the permission problem in Microsoft Excell Application in Dcomconfig
see this post for more details:
http://journeytodotnetauthority.blogspot.in/2012/03/how-to-add-microsoft-excel-application.html
Thanks,
Harikrishna Bura
-
Tuesday, March 13, 2012 6:09 AM
Hi Guo,
It works..!
Thanks for the solution..

