当您发布 Microsoft Internet Information Services 5.0, 中大表单字段可能会收到以下错误信息:
错误类型:
请求对象, ASP 0107 (0 x 80004005)
数据处理已超过允许的限制。
当您发布在 Microsoft Internet Information Server 4.0, 大型表单域可能会收到以下错误信息:
请求对象错误 ASP 0107: 80004005 ' '
堆栈溢出
/projectname/page.asp, 行 .XX
数据处理已超过允许的限制。
原因
大小限制的 Request 对象中检索到每个窗体域是 102,399 字节。 您超过此限制时发生此错误。
解决方案
要解决此问题, 请使用下列方法之一: • 不用读取表单变量值与 Request.Form 集合, 使用 Request.BinaryRead (Request.TotalBytes) , 并分析来自 Request.BinaryRead 的输出形式值。
• 使用文件上载方案, 如 PostingAcceptor Microsoft。
• 将 HTML 窗体变量分为多窗体变量之前您提交表单。 对于每个窗体变量, 102,399 字节限制是多窗体变量 102,399 字符或小于因此有。 以下示例代码阐释此: WARNING 你 BY OF USE 任何 THE CODE 按 IN 任务本文 AT YOUR OWN RISK IS:。 Microsoft 提供此代码 " 按原样 " 担保的任何类型, 明示或暗示, 包括但不限于适销性和/或用于特定目的适用性的暗示保证。
<FORM method=post action=LargePost.asp name=theForm onsubmit="BreakItUp()">
<Textarea rows=3 cols=100 name=BigTextArea>A bunch of text...</Textarea>
<input type=submit value=go>
</form>
<SCRIPT Language=JavaScript>
function BreakItUp()
{
//Set the limit for field size.
var FormLimit = 102399
//Get the value of the large input object.
var TempVar = new String
TempVar = document.theForm.BigTextArea.value
//If the length of the object is greater than the limit, break it
//into multiple objects.
if (TempVar.length > FormLimit)
{
document.theForm.BigTextArea.value = TempVar.substr(0, FormLimit)
TempVar = TempVar.substr(FormLimit)
while (TempVar.length > 0)
{
var objTEXTAREA = document.createElement("TEXTAREA")
objTEXTAREA.name = "BigTextArea"
objTEXTAREA.value = TempVar.substr(0, FormLimit)
document.theForm.appendChild(objTEXTAREA)
TempVar = TempVar.substr(FormLimit)
}
}
}
</SCRIPT>
接收 Active Server Page (ASP) 页重新构造变量:
<%
Dim BigTextArea
For I = 1 To Request.Form("BigTextArea").Count
BigTextArea = BigTextArea & Request.Form("BigTextArea")(I)
Next
%>
温馨提示:答案为网友推荐,仅供参考