0

I have a problem with a site which communicates to a C# service deployed on IIS7 on Windows Server 2008 (x64 version). The service is trying to access a COM object from a third party dll. When is doing that an exception of the following form is thrown:

System.InvalidCastException: Unable to cast COM object of type 'MyClass' to interface type 'TheirInterface'. 
This operation failed because the QueryInterface call on the COM component for the interface with IID '{88B11E8A-0B27-459C-BC28-A4D4113FD4AE}' failed due 
to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

I hosted the same site on many other machines working on Windows 7, so I suppose that the problem is related to the OS (Windows Server 2008). Any suggestion about wher I can search a solution for this exception, or if there is any configurations that should be made on the IIS?

0

1 Answer 1

2

You need to either run the website as a 32-bit website or use a COM object compiled against the x64 platform. In other words your COM object was unable to be load because it only supports being loaded by a 32-bit process.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.