现在的位置: 首页 > 综合 > 正文

asp页面抓取 采集源码内容 不同系统的不同写法

2013年06月16日 ⁄ 综合 ⁄ 共 864字 ⁄ 字号 评论关闭

msxml.dll 80072ee2

 

具体原因是采集本地文件引起,详解看:http://support.microsoft.com/kb/316451/zh-cn

 

我原本是32位2003系统(标准版),采集时用MSXML2.XMLHTTP.4.0,一页9秒左右。改为MSXML2.ServerXMLHTTP后为7秒左右。
将系统改为64位2008系统时(R2企业版),用MSXML2.XMLHTTP.4.0出错,用MSXML2.ServerXMLHTTP时70秒左右。
后来用代码测试:
<%On Error Resume Next
Response.Write "<h3>服务器XmlHttp组件版本支持情况:</h3>"
oxml=array("Msxml2.ServerXMLHTTP.6.0","Msxml2.ServerXMLHTTP.5.0","Msxml2.ServerXMLHTTP.4.0","Msxml2.ServerXMLHTTP.3.0","Msxml2.ServerXMLHTTP","Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","Msxml2.XMLHTTP.3.0","Msxml2.XMLHTTP")
for i=0 to ubound(oxml)
Set getxmlhttp = Server.CreateObject(oxml(i))
If Err Then
Err.Clear
Response.Write "不支持"&oxml(i)&"<br/>"
else
Response.Write "支持"&oxml(i)&"<br/>"
end if
next%>
发现64位的2008不支持xmlHttp4.0,改成xmlHttp.6.0后运行8秒左右。但是用serverXmlHttp.6.0时,70多秒。

为什么在2003下serverXmlHttp比XmlHttp快,而在2008下serverXmlHttp比XmlHttp慢呢?(主要是慢的太多,相差10倍左右)

 

 

【上篇】
【下篇】

抱歉!评论已关闭.