XMLHTTP SEND and 0x800C0005 error

K

kenny

Dears,
I create one asp program like below, but when I run the asp as http://localhost/test.asp, I meet 0x800C0005 error...How to solve it?
'****************test.asp*************************
<%

Dim objXMLHTTP, xml


Set xml = Server.CreateObject("Microsoft.XMLHTTP")

xml.Open "GET", "http://www.microsoft.com/", False

' Pull the data from the web page
xml.Send


Response.write "Here's the html we now have in our xml object"
Response.write "<BR><BR><BR>"
Response.Write "<xmp>"
Response.Write xml.responseText
Response.Write "</xmp>"
Response.write "<BR><BR><BR>"
Response.write " Now here's how the page looks:<BR><BR>"
Response.Write xml.responseText


Set xml = Nothing
%>
'*****************************************
 
A

Aaron Bertrand - MVP

I meet 0x800C0005 error...How to solve it?

That's great, but what is the TEXT of the message? You don't expect people
to identify hex codes in one glance, do you?

Anyway, try setting the user agent header, as I'm sure microsoft.com tries
to prevent being overrun by spiders, xmlhttp requests, etc. You can see
sample code at http://www.aspfaq.com/2173

Or, run your test against a site that is not such an obvious "test"
destination that would implement any kind of packet blocking/filtering...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,522
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top