I'm currently working on a page in Classic ASP (VB) which utilizes MSXML to read an external XML feed.
While this is working with no problem (ReadyState 4 reached) in localhost on my pc, once the code is on the server, it times out, with this error:
msxml3.dll error '80072ee2'
The operation timed out
I've tried to experiment with the setTimeouts, but to no avail.
I'm wondering if it might be settings in IIS, or perhaps an uninstalled Feature?
The code is below:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%' setup the URL
baseUrl ="http://w1.weather.gov/xml/current_obs/index.xml"
'/////Set http = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")
Set http = Server.CreateObject("MSXML2.ServerXMLHTTP")
Set myXML =Server.CreateObject("MSXML2.DOMDocument.3.0")
myXML.Async=False
http.open "GET", baseUrl, False
http.setRequestHeader "PREFIX", "prefix"
http.setTimeouts 30000, 60000, 30000, 240000
' send the HTTP data
http.send()
response.write("<BR>ReadyState is... "&http.ReadyState&"<BR>")
if http.ReadyState<>4 then
http.waitForResponse 3
response.write "server is down!"
response.End()
else
if Not myXML.load(http.responseXML) then 'an Error loading XML
returnString = ""
response.write("<br>error<br>")
Else 'parse the XML
Set nodesStationIndex=myXML.documentElement.selectNodes("//wx_station_index")
For each wx in nodesStationIndex
Set nodesStation=wx.selectNodes("station")
For each NS in nodesStation
Set nodesStatID=NS.selectNodes("station_id")
For each NS_ID in nodesStatID
response.write("<BR>"&NS_ID.text&"<BR>")
'response.flush()
next
next
next
End If 'end - XML load error check
end if 'end - ReadyState check
%>
I wanted to follow up on this.
It turns out that our local (central) IT department, which controls centralized permissions, etc., was indeed blocking the URL needed for the XML feed.
Now it's unblocked, and the code (above) works successfully.
Thanks everyone for your help.