Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

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

0.00/5 (No votes)
16 Aug 2013 1  
Fix to COM component retrieving error:80040154 in web application running in IIS

Introduction

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.

Background

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.

Solution

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!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here