msxml3.dll error '80072ee2' The operation timed out

Ben picture Ben · Nov 15, 2011 · Viewed 11.7k times · Source

I have a classic ASP page that is reading an external rss feed (xml document) and then displaying it on a web page. This was working fine until my website was moved to a new server. I think it is now Windows 2008. My script is now timing out. I don't think the problem is actually because it is taking too long as I have increased the time out values. does anyone know what the problem may be and how I can fix it?

The website is hosted on a shared server so I don't have much access to change any of the server settings.

The code I'm using is

Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")

' resolve, connect, send, receive - in milliseconds 
objhttp.setTimeouts 5000, 60000, 10000, 10000 

objHTTP.open "GET",RSSURL,false
objHTTP.send

The code returns the time out for the last line (objHTTP.send). "RSSURL" can be any external RSS feed. I was testing with http://www.valewisham.org.uk/rss.xml.

Answer

Jonathan picture Jonathan · Mar 27, 2015

I rarely use setTimeouts, because in most case you want an overall request timeout, try this instead:

Set objHTTP = Server.CreateObject("Msxml2.ServerXMLHTTP")

objHTTP.open "GET", RSSURL, true
objHTTP.send

objHttp.WaitForResponse 60

This code sets the open method third parameter to true in order to do an asynch request, then waits for the response after the send, timing out after 60 seconds