Link to home
Start Free TrialLog in
Avatar of globalwm
globalwm

asked on

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

This script has been running fine up until now (of course). I'm getting this error:

msxml3.dll error '80072ee2'

The operation timed out

/inv.asp, line 60


Function Mailbody
'on error resume next  
Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP")  
' Call the remote machine the request  
objXML.open "GET", SiteRoot & "inv.asp?whse=" & varWhse, False
objXML.SetRequestHeader "Content-Type", "text/html"
objXML.send()  

' return the response  
' clean up  
Mailbody = objXML.responsetext  
Set objXML = Nothing  
End Function  


Should I set varAsync = TRUE and do a loop:

objXML.open "GET", SiteRoot & "inv.asp?whse=" & varWhse, True
Do While objXml.readyState <> 4
DoEvents ???
Loop

as suggested at: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362416&SiteID=1

Not sure how to make this work again....
Avatar of golfDoctor
golfDoctor

If you haven't changed anything, try rebooting first.  
Avatar of globalwm

ASKER

I had installed MSXML 6.0 and tried using:

Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP.6.0")

- no change. Then I changed the line to:

Set objXML = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")

- no change.


I then rebooted the server - and it seems to have worked.


Can you tell me how to use Async = TRUE so it will wait for a response?

The open() method has varAsync parameter (third one) set to False which makes your send() call synchronous.  That means send() won't return until either entire response has been received or time out is detected.

You can set the parameter to True, call send() and enter into a loop to check for response.  You can add your own logic to decide what to do if you do not receive response within whatever amount of time you want to wait.

Since client code should not rely on the health of network connection (whether it's local network or Internet), you should not use synchronous send() method.  Always use asynchronous send() so that you can provide alternative experience to users in case something goes wrong.

ASKER CERTIFIED SOLUTION
Avatar of golfDoctor
golfDoctor

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial