Maximum Http file post size with IIS

klepto

Newcomer
Joined
Jun 4, 2003
Messages
7
I have written a component which posts binary data to a web page usinig HttpWebRequest, this works fine with any file types up to about 3.8mb. At that point the web page recieving the file refuses to read the data.

I have also tried this using a standard web page to post a file with a multipart/ form data and using the Request.Files collection to retrieve the data from the post, this also fails with file larger than about 3.8mb.

I have seen information relating to max http post size on unix based web servers, but can find no information on a limitation within IIS.

If anyone has any information relating to this 3.8mb limit I would be most greatfull.


:confused:
 
More on this problem from klepto:
the error I get within the Request.InputStream is [error: an exception of type: {System.Web.HttpException} occurred]. if the file is under 3.8 mb then this contains the incoming data stram handle. It feels like a transmition problem or at least a problem prior to the script being given the request data.
 
Thanks for your help! :rolleyes: , once I found the solution it is verry simple.

Just add the following to your web.config or mod the settings in the machine.config.

<system.web>
<httpRuntime maxRequestLength="XXXXXX" />
</system.web>

where XXXXXX is the max size in byte for http file posts.
 
Back
Top