Wednesday 27 September 2017

Difference Between maxRequestLength and maxAllowedContentLength.

maxRequestLength:-
--------------------------------
1/The maxRequestLength indicates the maximum file upload size supported by website.
2/maxRequestLength datatype is int.
3/Maximum value supported by maxRequestLength is 2147483647.
4/
Example:-
----------
<system.web>
    <httpRuntime maxRequestLength="2147483647"/>
</system.web>
5/maxRequestLength is in KB.


maxAllowedContentLength:-
-------------------------------------------
1/The maxAllowedContentLength indicates the maximum length of content in a request supported by IIS.
2/maxAllowedContentLength datatype is int.
3/Maximum value supported by maxAllowedContentLength is 2147483647.
4/
Example:-
----------
<system.webServer> 
         <security>
                 <requestFiltering>
                           <requestLimits maxAllowedContentLength="2147483647" />
                 </requestFiltering>
         </security> 
</system.webServer>
5/maxAllowedContentLength is in Bytes.


So you need to set both in order to upload large files.

0 comments:

Post a Comment