急求:asp中创建Microsoft.xmlhttp对象从服务器无法获取自己本地IIS运行出来的网页内容 的原因
asp中 创建Microsoft.xmlhttp或Msxml2.ServerXMLHTTP对象 服务器都无法获取自己本地IIS运行出来的网页内容
在有些Win2003上可以 有些Win2003上不可以,这一点说明源代码没有问题,环境都是Win2003SP2
是不是iis哪里的权限问题啊?
<%Function getHTTPPage() dim http set http=Server.createobject("Msxml2.ServerXMLHTTP") Http.open "GET","http://127.0.0.1/test.html",false Http.send() if Http.readystate<>4 then exit function end if getHTTPPage=bytesToBSTR(Http.responseBody,"GB2312") set http=nothing if err.number<>0 then Response.write(err.number) End functionFunction BytesToBstr(body,Cset) dim objstream set objstream = Server.CreateObject("adodb.stream") objstream.Type = 1 objstream.Mode =3 objstream.Open objstream.Write body objstream.Position = 0 objstream.Type = 2 objstream.Charset = Cset BytesToBstr = objstream.ReadText objstream.Close set objstream = nothingEnd FunctionResponse.write(getHTTPPage)%>