Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Inconsistencies in Web.config
Message
From
14/04/2019 15:49:13
 
 
To
14/04/2019 14:28:45
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01668072
Message ID:
01668074
Views:
36
>There are some inconsistencies in the Web.config in regards to the maximum accepted length on a post.
>
>For example, to indicate that we would like to support a post up to 20 MB, we would define it like this:
>
>
><system.web>
>  <httpRuntime maxRequestLength="20480" />
></system.web>
>
>
>IIS default at 30MB. So, let's say I would like to support up to 40 MB. This would mean I would adjust the value around something like this:
>
>
><system.web>
>  <httpRuntime maxRequestLength="40000" />
></system.web>
>
>
>As IIS defaults to 30 MB, I would then need to also add this:
>
>
>  <system.webServer>
>     <security>
>      <requestFiltering>
>         <requestLimits maxAllowedContentLength="4000000000" />
>      </requestFiltering>
>   </security>
>
>
>As you can see, maxRequestLength and maxAllowedContentLength uses two different scales.
>
>Do you know why this has been done like this?

https://weblog.west-wind.com/posts/2016/apr/06/configuring-aspnet-and-iis-request-length-for-post-data

Rick notes but doesn't explain the scale inconsistency. One is IIS, the other ASP.NET. My first guess is legacy, maybe the IIS setting is older and dates from a time when a byte was more meaningful. Or maybe it's useful there to be able to specify a small number of bytes (less than 1K), which it may not be possible to do with the ASP.NET setting.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform