Problem :timeout Error while using MSXML2.ServerXMLHTTP
I am using MSXML2.ServerXMLHTTP to access a web page which is located on another machine(localwebserver),trying to send XML request & accept the response
During the “Send” I get the following error.
The operation timed out
/pmstest/abc.asp, line 100”
The asp code is as follows:
Set objXmlDOM =Server.CreateObject(“Microsoft.XMLDOM”)
Set objXmlHTTP = Server.CreateObject(“MSXML2.ServerXMLHTTP”)
objXmlHTTP.setOption 1, true
objXmlHTTP.Open “POST”, Session(“strLocalWebServerPath”) & “/data_pulling.asp”, true
The error is shown on the line containing the code for objXmlHTTP.send(strPostXml).
This error occurs occasionally. after multiple quick attempts.
If objXmlHTTP.Open last parameter is set to False, the error is as follows
The operation has been canceled
/pmstest/abc.asp, line 100
Solution: timeout Error while using MSXML2.ServerXMLHTTP
Reading the Status property won’t help with timeouts because XMLHTTP will keep waiting for a response until a timeout occurs – Status simply tells you the status at any given point.
The correct way to handle timeouts is to use the SetTimeouts method to set various timeouts (connection, data transfer etc).
After setting the timeout values you request the page THEN check the Status, responseText or responseXML properties to determine whether or not the connection was successful.