Msxml2.XMLHTTP and agent

I’m using the following code…

Dim req

Set req = CreateObject(“Msxml2.XMLHTTP”)

Call req.open(“GET”, “http://url/…”, False)

Call req.send

When I run this agent manually, it works perfectly. However, when I attempt to use it in a WQS then I get the following error…

Error 213: msxml3.dll: The system cannot locate the resource specified.

The most recent xml file from MS was installed over the weekend.

Subject: Msxml2.XMLHTTP and agent

Hi Chris,I have the same problem how did you resolve it?

Subject: Msxml2.XMLHTTP and agent

Go to the server and open a browser. Type in the URL exactly as issued in your agent. Does it work? If not, is DNS configured properly on the server? And does the server actually have a working browser? If it does work in the browser, then chances are the version of MSXML you have is incompatible with something – the server OS, the IE version installed on the server, etc.

BTW: I have always had much better luck using WinHTTP instead of MSXML in agents. It’s also from Microsoft, also free, and more robust than MSXML.

Subject: RE: Msxml2.XMLHTTP and agent

Thanks for responding.

What directory should the msxml3.dll file be located?

Also, do I need to run “regsvr32”?

Subject: RE: Msxml2.XMLHTTP and agent

I honestly couldn’t tell you. I’ve used WinHTTP in all cases where I’ve been doing work like this for the past several years. The last time I touched MSXML was probably in 2002. I imagine that there’s got to be documentation for MSXML up on the Microsoft site, somewhere. Here’s the doc for WinHTTP:

WinHttp is pre-installed on recent windows versions, including XP SP1, Win2K3 and Win2K SP3. There are also install packages available for earlier versions – but you’ll have to go looking for them.

Subject: Msxml2.XMLHTTP and agent

Hi, you should- check msxml version on server, maybe it’s an older one

  • user Msxml2.ServerXMLHTTP instead

  • check connections

my code on a server with MSXML4 installed looks like this:

Dim msxmlHTTP As Variant

Set msxmlHTTP = CreateObject( “Msxml2.ServerXMLHTTP.4.0” )

Call msxmlHTTP.open(“POST”, URL, False, “”, “”)

Call msxmlHTTP.send(Request)

GET instead of POST may not need an argument for send.