Interop.MSXML2 throwing exceptions because its not registered BUT IT WONT REGISTER!

aarona picture aarona · Aug 20, 2009 · Viewed 7.6k times · Source

Ok, this line of code:

XMLHTTP40 http = new XMLHTTP40();

Throws a System.Runtime.InteropServices.COMException and complains that:

Retrieving the COM class factory for component with CLSID {88D969C5-F192-11D4-A65F-0040963251E5} failed due to the following error: 80040154.

I have googled that and I guess the DLL needs to be registered because its a COM DLL. That's fine, but when I try to register it I get this error:

C:\some\directory\path\etc\Interop.MSXML2.dll was loaded, but the DllRegisterServer entry point was not found.
This file can not be registered.

Apparently this is working on another guys box (he wrote the code, so yeah.. :P). This COM object does not show up in my list of available COM references so I just reference the DLL which is sitting in the bin\Debug directory of the project. When I add the reference to this DLL to my project, I get access to all of the symbols in VisualStudio. I'm wondering, is there something that I can install that would register the DLL and have it show up in my list of COM objects that I can reference? I installed what I thought was the MSXML 4.0 library but when I looked in the directory there wasn't anything in there.

Any ideas?

Answer

AnthonyWJones picture AnthonyWJones · Aug 20, 2009

You need to actually have MSXML4 installed on your box for it to work. THe interop dll doesn't contain any runtime code it only helps .NET talk to MSXML4.

However why would you not use the System.Xml namespace instead of using a COM component?