当前位置: 代码迷 >> ASP >> XMLHTTP 怎么设置超时
  详细解决方案

XMLHTTP 怎么设置超时

热度:766   发布时间:2012-03-23 12:06:21.0
XMLHTTP 如何设置超时!
RT

有人说用MSXML2.ServerXMLHTTP可以设置超时,可是根本无法创建这个对象,如果想用这个该装什么,奇怪了msxml6.0   难道还不行

------解决方案--------------------
装MSXML Parser 4.0

Dim xmlServerHttp As New Msxml2.ServerXMLHTTP40
Dim lResolve, lConnect, lSend, lReceive As Long
lResolve = 5 * 1000
lConnect = 5 * 1000
lSend = 15 * 1000
lReceive = 15 * 1000
xmlServerHttp.setTimeouts lResolve, lConnect, lSend, lReceive
xmlServerHttp.open "GET ", "http://localhost/sample.xml ", False
xmlServerHttp.send

------解决方案--------------------
也可以不用超时,判断返回值不就成了.
如200表示正常打开等.
  相关解决方案