Link to home
Start Free TrialLog in
Avatar of willa666
willa666Flag for United States of America

asked on

works for msxml3 but not msxml4

I am trying to use this ASP code on a server with msxml4 installed and i get athis error message"The object does not exisits"

If i try the same code on a server with msxml3 installed then it works.

is their somthing silly that i am missing?

<%
dim objXMLHTTP
dim SEARCH_STR
      IF Request("WORD") = "" THEN
            SEARCH_STR = "PSP"
      ELSE
            SEARCH_STR = Request("WORD")
      END IF
URL = "http://search.ebay.com/"& SEARCH_STR
Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP")
objXMLHTTP.Open "GET", URL, false
objXMLHTTP.Send
start = InStr(objXMLHTTP.responsetext, "<html>")
finish = InStr(objXMLHTTP.responsetext, "</html>")
amount = finish - start
extract = Mid(objXMLHTTP.responsetext,start,amount)
Response.Write URL
Response.Write extract
Set objXMLHTTP = Nothing
%>
Avatar of German_Rumm
German_Rumm

Hi willa666,

Try
Server.CreateObject("Msxml2.XMLHTTP.4.0");

---
German Rumm.
Avatar of willa666

ASKER

Hi German_Rumm

Now it reads
Set objXMLHTTP = Server.CreateObject("Msxml2.XMLHTTP.4.0")

But i get this error message

msxml4.dll error '800c0005'

The system cannot locate the resource specified.

/index3.asp, line 33
using Msxml2.XmlHttp actually piggybacks off the wininet.dll

on the server, you should use Msxml2.ServerXMLHTTP and run the proxycfg.exe to set the proxy settings if there is one. the code remains the same with some extra features

how to identify errors with ServerXMLHTTP (also applies to XMLHTTP)
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q299566&ID=KB;EN-US;Q299566

ServerXMLHTTP
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/html/xmobjxmldomserverxmlhttp.asp
Hi b1xml2

So what do you think is happening for this error to occure?
I have got it working again, but i have changed it to
Server.CreateObject("WinHttp.WinHttpRequest.5.1")

ASKER CERTIFIED SOLUTION
Avatar of b1xml2
b1xml2
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
cool well i guess that sorts out that !