Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154
.NET, ASP.NET | Nauman | November 3, 2009 at 8:59 amSometimes when working with office Interop assemblies the above mentioned error occurs. I had also got the same when using Microsoft Excel interop assembly and adding its reference in my ASP.NET application.
The problem is that by default when Microsoft Excel is used as a COM object then it can only be activated by the following accounts:
- Administrator
- System
- Interactive
And when you are running your web application on windows server 2003, it is running under ASPNET account.
The way to resolve this issue is to edit the DCOM configuration settings for Microsoft Excel Application object.
Configure DCOM
- Go to Start -> Run.
- Type DCOMCNFG. (This will load the "Component Services")
- Go to Component Services -> Computers -> My Computer -> DCOM Config -> Microsoft Excel Application.
- Right click and select Properties.
- Select the Security tab.
Press Add button to select the "Network Service" account.
Click the OK button, and then test your application, it should work fine now.
Tags: .NET, asp.net, class factory, dcom, error, excel, excel application, interop, Microsoft, network service, workbook


Tweet This
Digg This
Save to delicious
Stumble it
hmm, now i got it…. thanks for sharing.
if microsoft office is not there in my system..then what to do.can you help me?
some guys said to use 32 bit OS, im using . And im not using this excel object. im using vendors dll meant for vb.net wch I converted using tlbimp to be used in my c# code and now getting the error com class factory ….. any idea to workaround??
hi i done all those things which mentioned above but i cant find solution. still i am getting this error.
My doubt is whether there’s relation between administrator Login or Ordinary user Login
you have to use Admin Login for changing Excel properties.