We have all seen the 80040154 COM error. Normally the solution is to run regsvr32 on the com dll so it is registered on the machine.

"System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {D1CB0D81-7D2B-4064-9AC7-D0D88DEC3D16} failed due to the following error: 80040154."

Of course regsvr32 was the first thing I did, but the error still happened in the ASP.Net MVC project on IIS7/ Server 2008. Using regedit.exe verified the dll was registered, so I ran the NUnit tests... same error! The solution is to permit the IIS7 App Pool to run 32 bit code as shown below:

IIS7 COM Gotcha