Click here to Skip to main content
13,863,239 members
Click here to Skip to main content
Add your own
alternative version


3 bookmarked
Posted 16 Aug 2013
Licenced CPOL

Retrieving the COM Class Factory for Component with CLSID...Failed Due to the Following Error: 80040154

, 16 Aug 2013
Rate this:
Please Sign up or sign in to vote.
Fix to COM component retrieving error:80040154 in web application running in IIS


As the title tells the story, this tip is about solving the error 80040154 which is thrown while retrieving a COM component in a web application hosted in IIS 7.


I was working in an Email Marketing App where a module was built on top of a COM component that takes snapshots of the rendered HTML email from FCK editor and saves a thumbnail image. The project was developed in Visual Studio 2010 and everything compiles and run without any issue.

After deploying the application in IIS (IIS 7 in my case), I got this strange error which was not descriptive enough to give any lead. After doing a considerable amount of Googling, it took me nowhere. Because, people are getting the same error for variety of reasons. With no good luck and as I was dealing with web application, I decided to tune different settings in IIS.


In my case, the solution was pretty simple. I noticed that in the advanced setting of the application pool used by my web app, there is a flag called Enable 32-bit Application which was set to False by default. Of course, the com component causing the problem was also 32 bit. So, I set the flag to True. After restarting the IIS, I ran the application again and voila!


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Moudud Hassan
Software Developer (Senior) Brain Station-23
Bangladesh Bangladesh
My name is Moudud Hassan. I am professionally developing software for 7 years. I work mostly with Microsoft Stack of technologies such as C#, ASP.NET, ASP.NET MVC, Microsoft SQL Server. Being an agile developer I work with Html/CSS/Javascript and various cool Js framework such as jquery, backbone, knockout and angularjs. I am fascinated by new technologies and always looking forward to adapt. I value your information and feedback especially where I can Improve.

You may also be interested in...

Comments and Discussions

QuestionIt is working for me Pin
chandraprakashkabra10-Jun-18 22:14
professionalchandraprakashkabra10-Jun-18 22:14 
QuestionIt works for me... Pin
AMIT_BHAGAT13-Oct-15 1:47
memberAMIT_BHAGAT13-Oct-15 1:47 
QuestionMissing 32bit setting Pin
Thanasis I.12-Sep-14 4:30
memberThanasis I.12-Sep-14 4:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04 | 2.8.190214.1 | Last Updated 16 Aug 2013
Article Copyright 2013 by Moudud Hassan
Everything else Copyright © CodeProject, 1999-2019
Layout: fixed | fluid