sarat
sarat

Reputation: 11130

Error Retrieving the COM class factory for component

I have a web service which loads a 32-bit COM component. I am running this web service with IIS server in my local machine.

When I load the the test page from Visual Studio it succeeds, on the other hand, while loading it using IIS, it display following error

Retrieving the COM class factory for component XXX failed due to the following error: 80070005.

I tried changing the webservice's platform to x86 from Any CPU but that dint help. I am running this on Windows Server 2008 R2 - 64 bit.

Upvotes: 2

Views: 4546

Answers (3)

HammerJack
HammerJack

Reputation: 1

Sarat, this cannot be right. The "Enable 32-bit Applications" under Application Pools Defaults is not for running 32-bit applications or to solve your problem. It is there to enforce running 32-bit applications UNDER 32-bit processes only, which is not necessary in this case. Most 32-bit applications run fine on 64-bit processes. That's why you can run MS Office 2010 (which is still a 32-bit application) on Windows 7 64-bit machines.

You must have other settings tried and true after nearly a full year answering the original problem.

Upvotes: 0

sarat
sarat

Reputation: 11130

I had to enable the 32-bit Applications from the Application Pools settings.

Upvotes: 1

user191966
user191966

Reputation:

Check permissions on that COM. It may be that when you're running tests from VS, you're running as you (admin), while the user running the website's app-pool is totally different. That user needs to be added read+execute (or, activate, whatever) permissions for "local".

Maybe also see this: Retrieving the COM class factory for component error while generating word document

Upvotes: 0

Related Questions