Link to home
Start Free TrialLog in
Avatar of robrodp
robrodpFlag for Mexico

asked on

Data passed in post too long asp

I have a <form method ="post" action="action.asp">
<input type="text" name="data" value=<%=string%>>

When the string is very long  (say 256K) it is not passed to action.asp.

When I set
data=request.form("data")

And response.write data

I get an error.

Not allowed

Wtih shorter strings it works fine. This is on my server windows 2012 iis 8.

I am sure there is a setting to allow larger strings. I just cant figure out where to set/reset it

Any ideas?
Avatar of Nitin Sontakke
Nitin Sontakke
Flag of India image

Hello,

Try adding following in your web.config:

<system.webServer>
   <security>
      <requestFiltering>
         <requestLimits maxAllowedContentLength="1073741824" />
      </requestFiltering>
   </security>
 </system.webServer>

Open in new window


Note that the value is in bytes and amounts to 1GB. Modify as per your requirement.
Avatar of robrodp

ASKER

Thx

Where is that file web.config?
This is classic asp or asp.net?
ASKER CERTIFIED SOLUTION
Avatar of Nitin Sontakke
Nitin Sontakke
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of robrodp

ASKER

Great solution thx