Answers for "max request length in c#"

2

iis Maximum request length exceeded

Modify web.config adding these elements:
  <configuration>
    <system.web>
      <httpRuntime maxRequestLength="1048576" />
    </system.web>
  </configuration>

For IIS7 and above (included IIS Express), you also need to add:
 <system.webServer>
   <security>
      <requestFiltering>
         <requestLimits maxAllowedContentLength="1073741824" />
      </requestFiltering>
   </security>
 </system.webServer>
 
Note:
maxRequestLength is measured in kilobytes
maxAllowedContentLength is measured in bytes
Posted by: Guest on March-16-2020
0

set request size c#

<system.web>
    <httpRuntime maxRequestLength="15000000"/>
  </system.web>
Posted by: Guest on August-29-2020

Browse Popular Code Answers by Language