...

View Full Version : MSXML2.ServerXMLHTTP



Pryach
08-21-2007, 09:57 PM
I have two files, xm1.asp and xml2.asp

xml1.asp



<%
url = "http://www.domain.com/xml2.asp"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, true
xmlhttp.send ""
response.write xmlhttp.responseText
set xmlhttp = nothing
%>

xml2.asp


Hello World!

xml1.asp and xml2.asp exist on two different web servers. Basically what I want xml1.asp to do is grab the contents of xml2.asp and response.write it.

When I run xml1.asp I get:



msxml3.dll error '8000000a'

The data necessary to complete this operation is not yet available.

xml1.asp, line 6

Line 6 is the response.write

Daemonspyre
08-21-2007, 11:21 PM
A quick search of Google for your error turns up this information.

http://jszen.blogspot.com/2005/03/xmlhttp-and-readystate.html

Pryach
08-22-2007, 12:27 AM
That seems to be JavaScript.

I can't get this to work in ASP:

xmlHTTP.onreadystatechange = handleStateChange

I get Type mismatch: 'xmlhttp.onreadystatechange'

Daemonspyre
08-22-2007, 02:13 AM
Since MS's XML HTTP system is built on the JS engine, the work very similarly.

If you are getting a type mismatch, then that is not the same as the error that you posted above.

Which one are you getting? The "data" issue or a "mismatch" issue?

miranda
08-23-2007, 12:06 AM
Remove the "" after the xmlhttp.send.



<%
url = "http://www.domain.com/xml2.asp"
set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "GET", url, true
xmlhttp.send
response.write xmlhttp.responseText
set xmlhttp = nothing
%>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum