Solved

limit to POST length

Posted on 2002-07-12
11
2,414 Views
Last Modified: 2010-05-18
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.value = data;

    document.myform.cmdSubmit.value="Data loaded, length is: " +  document.myform.myhidden.value.length;
    document.myform.cmdSubmit.disabled=false;
 }
</script>
</head>

<BODY onLoad='setTimeout("loadData()",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") ) %>
0
Comment
Question by:knightEknight
  • 5
  • 2
  • 2
  • +2
11 Comments
 
LVL 22

Expert Comment

by:CJ_S
ID: 7150164
var MAXLENGTH = 204800 - 1;  // change the 1 to 0 and it doesn't work!

to

var MAXLENGTH = 102400 - 1;  // change the 1 to 0 and it doesn't work!

does that work?
0
 
LVL 33

Author Comment

by:knightEknight
ID: 7150173
no ... the point is that any amount of data greater than 102400 in length will not post ... the ASP page reports an error.
0
 
LVL 33

Author Comment

by:knightEknight
ID: 7150178
I mean greater or equal  ...
0
 
LVL 22

Expert Comment

by:CJ_S
ID: 7150210
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
0
 
LVL 33

Author Comment

by:knightEknight
ID: 7150220
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!
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 46

Expert Comment

by:fritz_the_blank
ID: 7150232
Is this relevant? It seems like this might be related:

http://support.microsoft.com/default.aspx?scid=kb;EN-US;q260694

Fritz the Blank
0
 
LVL 33

Author Comment

by:knightEknight
ID: 7150321
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.
0
 
LVL 11

Expert Comment

by:mouatts
ID: 7150556
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
0
 
LVL 7

Accepted Solution

by:
daniel_c earned 50 total points
ID: 7151953
Or probably this is another solution from Microsoft?
http://support.microsoft.com/default.aspx?scid=kb;EN;q273482
0
 
LVL 7

Expert Comment

by:daniel_c
ID: 7151955
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-data">

AND in the target file (PostLimitTest.asp) will be:
<%

   Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

   mySmartUpload.Upload

   hiddenData = mySmartUpload.Form("myhidden")

   ...

   set mySmartUpload = nothing
%>

This trick works for me. Hopefully it works for you too.

^_^


0
 
LVL 33

Author Comment

by:knightEknight
ID: 7155304
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.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
if form parameter is null redirect 2 53
How to update a dummy recordset with classic ASP 4 65
asp syntax 3 37
Server Timeout with Loop 6 38
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now