XMLHTTP post长度问题 - Web 开发 / Ajax
chkurl="http://XXX.XXX.XXX.XXX/send?LoginUser=test&LoginPwd=test&cmdID=1&Content="&FistStr&Content&LastStr
Set objXML = createobject("MSXML2.XMLHTTP")
with objXML
.open "post", chkurl, false
.send 'send_body
end with
ResFlg=objXML.responseText
set objXML = nothing
以上POST时,若chkurl长度超过2083,则报如下错误:
msxml3.dll 错误 '800c0005'
系统未找到指定的资源。
我查网上说可以调大“WINNT\system32\inetsrv\MetaBase.xml”的“AspMaxRequestEntityAllowed="204800000"” ,但我把204800000改为404800000,chkurl长度超过2083仍然报同样错误,请问该怎样解决chkurl长度问题?谢谢
------解决方案--------------------
你把数据放在URL中实际上是受到url地址长度的限制,不是POST的限制吧
VBScript code
chkurl="http://XXX.XXX.XXX.XXX/send"
data = "LoginUser=test&LoginPwd=test&cmdID=1&Content=" & FistStr & Content&LastStr
Set objXML = createobject("MSXML2.XMLHTTP")
With objXML
.open "POST", chkurl, False
.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
.send data
End With