Wednesday, August 22, 2012

Retrieving the COM class factory for component failed due to the following error: 80040154

Retrieving the COM class factory for component with CLSID {XXXXXXXX-XX...} failed due to the following error: 80040154

This error came out of nowhere today on one of our IIS boxes. There are appears to be several ways to resolve this issue:


  1. Modify your project's platform from 'Any CPU' to 'X86' in Project Properties, Build/Platform's Target in Visual Studio
  2. If your Application is a Web-Based Application, try setting IIS to run in 32-bit mode. You can do this by going to IIS Manager, selecting the Application Pool, then choosing "Advanced Settings". The second option from the top is "Enable 32-bit Applications".
  3. If your Application is Web-Based, it could be that the com object was not configured to allow launch and access permissions for the aspnet user identity. Under administrative tools > Component services under the tree view, go to Component Services > Computers > My Computer > DCOM Config and find the registered com object. Right click for properties. Under the security tag, customize the Permissions to allow asp.net user
  4. Check that the app pool is running on the correct version of .net. 
The problem for us was fix number 4, some how the app pool had switch from 4.0 to 2.0 .net. The suspect was a recent patch update.

No comments:

Post a Comment