asp頁面抓取 採集源碼內容 不同系統的不同寫法

來源:互聯網
上載者:User

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倍左右)

 

 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.