views:

647

answers:

2

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?

A: 

You need to register (regsvr32) msxml4.dll, not the interop assembly. msxml4.dll is the COM server.

sharptooth
This technically is the correct answer. The issue is that this should already be registered and the issue I was having was trying to register an Interop DLL that gets compiled to interface with the COM DLL. However, I just rewrote my interface using `System.XML` and now I dont have to deal with COM at all. Thanks.
DJTripleThreat
+2  A: 

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?

AnthonyWJones