Msxml2.XMLHTTP.3.0对象执行send方法遇301页面出错(0x80070005).
gud5 2009-10-29 10:32:20 运行环境: winxp IIS5.1
错误提示:
msxml3.dll (0x80070005)
拒绝访问。
/1.asp, 第 23 行
代码如下:
<%
'set xml = Server.CreateObject("MSXML2.XMLHTTP")
'set xml = Server.CreateObject("MSXML2.ServerXMLHTTP.4.0")
'set xml = Server.CreateObject("Microsoft.XMLHTTP")
'set xml = Server.CreateObject("MSXML2.ServerXMLHTTP.3.0") '注释1
set xml = Server.CreateObject("Msxml2.XMLHTTP.3.0")
'xml.open "HEAD","http://web.aaafc.com", True '注释2
'xml.open "GET","http://www.aaafc.com", False
xml.open "HEAD","http://web.aaafc.com", False
xml.send '出错行
response.write xml.status '出错行2
set xml = nothing
%>
1,URL为301状态,就会提示错误.
2,如使用 注释1 的set语句则正常运行,但无论任何Url(包括404)均返回200.
3,如使用 注释2 异步处理,则在 出错行2 处出错.