.Net Request size limits

There are 2 settings in the web.config for managing request size limits

This is how to allow 8 MB request length:
First the httpRuntime maxRequestLength is in KB so 8192KB = 8MB


   <system.web>
    <customErrors mode="Off"/>
    <compilation debug="true"/>
    <httpRuntime targetFramework="4.5"
       maxRequestLength="8192"          />
    
    
  </system.web>

Next, ‘requestLimits maxAllowedContentLength’ is in bytes so 8388608 bytes = 8MB

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

      
    
  

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s