knightEknight
asked on
limit to POST length
The following test page seems to indicate that there is a 100K (1024*100) limit to the amount of data that can be POSTed to IIS ... does anyone know how to increase this limit?
<!------------------- PostLimitTest.htm ------------------->
<HTML>
<HEAD>
<TITLE>Post Limit Test</title>
<SCRIPT language='javascript'>
function loadData()
{
var MAXLENGTH = 102400 - 1; // change the 1 to 0 and it doesn't work!
var data = "0123456789ABCDEF";
while ( data.length < MAXLENGTH )
data += data;
data = data.substring(0,MAXLENGTH );
document.myform.myhidden.v alue = data;
document.myform.cmdSubmit. value="Dat a loaded, length is: " + document.myform.myhidden.v alue.lengt h;
document.myform.cmdSubmit. disabled=f alse;
}
</script>
</head>
<BODY onLoad='setTimeout("loadDa ta()",1);' >
<FORM name='myform' method='post' action='PostLimitTest.asp' >
<INPUT type='hidden' name='myhidden' value="" >
<INPUT type='submit' name='cmdSubmit' value='Loading data, please wait ...' disabled >
</form>
</body>
</html>
<!------------------- PostLimitTest.asp ------------------->
Request Data Length: <%= len( request("myhidden") ) %>
<!------------------- PostLimitTest.htm ------------------->
<HTML>
<HEAD>
<TITLE>Post Limit Test</title>
<SCRIPT language='javascript'>
function loadData()
{
var MAXLENGTH = 102400 - 1; // change the 1 to 0 and it doesn't work!
var data = "0123456789ABCDEF";
while ( data.length < MAXLENGTH )
data += data;
data = data.substring(0,MAXLENGTH
document.myform.myhidden.v
document.myform.cmdSubmit.
document.myform.cmdSubmit.
}
</script>
</head>
<BODY onLoad='setTimeout("loadDa
<FORM name='myform' method='post' action='PostLimitTest.asp'
<INPUT type='hidden' name='myhidden' value="" >
<INPUT type='submit' name='cmdSubmit' value='Loading data, please wait ...' disabled >
</form>
</body>
</html>
<!------------------- PostLimitTest.asp ------------------->
Request Data Length: <%= len( request("myhidden") ) %>
ASKER
no ... the point is that any amount of data greater than 102400 in length will not post ... the ASP page reports an error.
ASKER
I mean greater or equal ...
Made a test case on my development machine and it works flawless. Did 204800 flawlessly. But when I wrote the string out my machine had trouble rendering it :-/
My machine: Windows XP, Internet Explorer 6.
CJ
My machine: Windows XP, Internet Explorer 6.
CJ
ASKER
ok ... that makes me think there is a value I can set on the server ... or maybe in the form-tag ... content-length="102401" ... I'm looking into it. Thanks!
Is this relevant? It seems like this might be related:
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q260694
Fritz the Blank
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q260694
Fritz the Blank
ASKER
thanks fritz, that just might be it ...
I won't have access to the server until Monday however, so I'll have to check into it then. Thanks again, both of you.
I won't have access to the server until Monday however, so I'll have to check into it then. Thanks again, both of you.
Kek - definately not on the form tag.
the registry value looks likely - only thing is you will be opening your self up for a denial of service attack.
Steve
the registry value looks likely - only thing is you will be opening your self up for a denial of service attack.
Steve
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
So far, to deal with a huge data, if "post" can not handle that, I use a trick by using some asp upload component (I used to use ASPSmartUpload - http://www.aspsmart.com/aspSmartUpload/).
So, in the form, it will be:
<FORM name='myform' method='post' action='PostLimitTest.asp' ENCTYPE="multipart/form-da ta">
AND in the target file (PostLimitTest.asp) will be:
<%
Set mySmartUpload = Server.CreateObject("aspSm artUpload. SmartUploa d")
mySmartUpload.Upload
hiddenData = mySmartUpload.Form("myhidd en")
...
set mySmartUpload = nothing
%>
This trick works for me. Hopefully it works for you too.
^_^
So, in the form, it will be:
<FORM name='myform' method='post' action='PostLimitTest.asp'
AND in the target file (PostLimitTest.asp) will be:
<%
Set mySmartUpload = Server.CreateObject("aspSm
mySmartUpload.Upload
hiddenData = mySmartUpload.Form("myhidd
...
set mySmartUpload = nothing
%>
This trick works for me. Hopefully it works for you too.
^_^
ASKER
This article correctly identified the problem ... which is not with the _total_ amount of form data being posted, but rather with the limit placed on a single form field in ASP(100K). The solutions are to 1) break up the field into smaller chunks, or 2) use Request.BinaryRead ... but the latter solution leaves me no way to parse the data as a string ... so I'll have to go with the first way (which is cumbersome) unless someone can help me with # 2 (for more points, ofcourse!)
Thanks everyone! This has been an education.
Thanks everyone! This has been an education.
to
var MAXLENGTH = 102400 - 1; // change the 1 to 0 and it doesn't work!
does that work?