XMLHTTP的send为什么不能用啊?

awerli 2004-01-16 05:31:24
就是send出错,其他都正常的...
数据得不到啊。。。

提示:The system cannot locate the resource specified.

帮忙....
...全文
506 18 打赏 收藏 转发到动态 举报
写回复
用AI写文章
18 条回复
切换为时间正序
请发表友善的回复…
发表回复
awerli 2004-01-16
  • 打赏
  • 举报
回复
url没错~~~
代码也没错的....

就报这个 The system cannot locate the resource specified.
就是到Http.send() 这里不行的..

xml不是最新但肯定好用,
javascript里客户端可以执行.....
系统是2003E文的,都是NTFS,

我想是不是iis6里面设置的问题啊........??
awerli 2004-01-16
  • 打赏
  • 举报
回复
唉........果然smxml4.......
Lauxy 2004-01-16
  • 打赏
  • 举报
回复
正常情况下
set http=Server.createobject("Microsoft.XMLHTTP")
Http.open "GET",url,false
Http.send()
应该好使
若出错可能是url的问题
孟子E章 2004-01-16
  • 打赏
  • 举报
回复
url错误
ttt2 2004-01-16
  • 打赏
  • 举报
回复
装上xml最新版试试
qunluo 2004-01-16
  • 打赏
  • 举报
回复
有用!
wcqgm 2004-01-16
  • 打赏
  • 举报
回复
function getTerritory(sValue){
if(sValue!="")
{
sCondition = "sCondition=D2801='" + sValue;
sendBack(sCondition);
}
else
{
frmInfo.D0115.outerHTML=frmInfo.D0115.outerHTML.replace(frmInfo.D0115.innerHTML,"<option value=\"\"></option>");
}
}


function sendBack(sCondition){
var oXmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
//var oXmlHttp=loadXmlDocument("Microsoft.XMLHTTP")
oXmlHttp.open("POST", "../public/areaInfo.asp", false);
oXmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
oXmlHttp.send(sCondition);

if(oXmlHttp.status != 200){
alert("程序有异常,请与管理员联系!");
return false;
}

oXmlDoc = new ActiveXObject("Microsoft.XMLDOM");
oXmlDoc.load(oXmlHttp.responseXML)
oRoot = oXmlDoc.documentElement;
if(oRoot.childNodes.length > 0){
strOptions="<option value=''></option>";
for(i=0;i<oRoot.childNodes.length;i++){
oNode=oRoot.childNodes(i);
strOptions+="<option value='" +oNode.text+"'>"+oNode.attributes.item(0).text+"</option>";
}
frmInfo.D0115.outerHTML=frmInfo.D0115.outerHTML.replace(frmInfo.D0115.innerHTML,strOptions);
}else{
frmInfo.D0115.outerHTML=frmInfo.D0115.outerHTML.replace(frmInfo.D0115.innerHTML,"<option value=\"\"></option>");
}
}
Iamfish 2004-01-16
  • 打赏
  • 举报
回复
msxml3.dll的问题吧?
装msxml4看看。
coffee_cn 2004-01-16
  • 打赏
  • 举报
回复
封装了的:

function PostData ()
{
var host = "http://www.sina.com/login.asp"
var site = "http://www.sina.com/success.asp"
var data = "login_name=coffee_cn&login_passwd=123456"
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP")
xmlhttp.Open("POST", host, false)
xmlhttp.setRequestHeader("Host", "WWW.SINA.COM")
xmlhttp.setRequestHeader("Connection", "none")
xmlhttp.setRequestHeader("User-Agent", "Mozilla/4.0")
xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
xmlhttp.Send(data)
var header = xmlhttp.getAllResponseHeaders()
var start = header.indexOf("sessionKey=")
if (start > 0 && header.charAt(start + 12) < ' ')
start = header.indexOf("sessionKey=", start + 12)
if (start > 0 && parent.edong) {
var end = header.indexOf("\r\n", start + 12)
header = header.substring(start, end)
parent.edong.document.cookie = header
parent.edong.location.replace(site)
}
}

nchen123 2004-01-16
  • 打赏
  • 举报
回复
把代码贴出来
awerli 2004-01-16
  • 打赏
  • 举报
回复
错误代码......
去掉on error resume next 才....晕死.........

msxml3.dll error '800c0005'

The system cannot locate the resource specified.
帮忙看看啊
awerli 2004-01-16
  • 打赏
  • 举报
回复
Function getHTTPPage(url)
on error resume next
response.write i+1&url&"<br>"
'response.end
dim httpt
set httpt=Server.createobject("Microsoft.XMLHTTP")
Httpt.open "GET",url,false,"", ""
Httpt.send

if err.number<>0 then
Response.write err.description
'Response.End
end if

if Httpt.readystate<>4 then
exit function
end if
getHTTPPage=bytesToBSTR(Httpt.responseBody,"GB2312")
set httpt=nothing
if err.number<>0 then err.Clear
End function

DeltaCat 2004-01-16
  • 打赏
  • 举报
回复
代码贴一下吧
xzq686 2004-01-16
  • 打赏
  • 举报
回复
应该还有Error processing resource 。。。吧!
xzq686 2004-01-16
  • 打赏
  • 举报
回复
就报这个 The system cannot locate the resource specified.??
后面应该还有错误信息吧??
xieyj 2004-01-16
  • 打赏
  • 举报
回复
我封装了以下两个函数,你试试:ReadData(url)有没有问题
'字符转换
Function bytes2BSTR(vIn)
On Error Resume Next
Dim strReturn,i,ThisCharCode,innerCode,Hight8,Low8,NextCharCode
strReturn = ""
For i = 1 To LenB(vIn)
ThisCharCode = AscB(MidB(vIn,i,1))
If ThisCharCode < &H80 Then
strReturn = strReturn & Chr(ThisCharCode)
Else
NextCharCode = AscB(MidB(vIn,i+1,1))
strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
i = i + 1
End If
Next
bytes2BSTR = strReturn
If Err.Number <> 0 Then Err.Clear
End Function

'读取数据
Function ReadData(Url)
On Error Resume Next
Dim myXml
Set myXml = CreateObject("Microsoft.XMLHttp")
If Err.Number <> 0 Then Set myXml = CreateObject("Msxml2.XMLHTTP")
myXml.Open "Get", Url, False
'myXml.SetRequestHeader "Content-type", "text/html"
myXml.Send()
If myXml.ReadyState <> 4 Then
ReadData = "读取数据出错!"
Else
ReadData = bytes2BSTR(myXml.ResponseBody)
End If
Set myXml = Nothing
If Err.Number <> 0 Then Err.Clear
End Function
nik_Amis 2004-01-16
  • 打赏
  • 举报
回复
up
awerli 2004-01-16
  • 打赏
  • 举报
回复
up??????????

28,391

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧