0

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


%>
buck1112
  • 504
  • 8
  • 24
  • Don't mix versions of MSXML in the same script. If you're calling `MSXML2.DOMDocument.3.0` then call `MSXML2.ServerXMLHTTP.3.0`, if your calling `MSXML2.DOMDocument.6.0` then call `MSXML2.ServerXMLHTTP.6.0`. Use 6.0 unless you have a specific reason not to. – John Nov 07 '15 at 11:25
  • Thanks. I've corrected this, but still the timeout problem remains. Does anyone know of good troubleshooting steps for this? The log indicated that a 500 error occurred, but no more info was available. I've seen this timeout problem quite a few places, without resolution. – buck1112 Nov 16 '15 at 20:59

1 Answers1

0

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.

buck1112
  • 504
  • 8
  • 24