0

I have seen how to set length using web.config such as below

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <system.web>
    <!-- ~ 2GB -->
    <httpRuntime maxRequestLength="2147483647" />
  </system.web>
  <system.webServer>
    <security>
      <requestFiltering>
        <!-- ~ 4GB -->
        <requestLimits maxAllowedContentLength="4294967295" />
      </requestFiltering>
    </security>
  </system.webServer>
</configuration>

Can this be set at the url level?

/Login.aspx to have a different length than the default one.

Edit

Upon searching l found this here which specified Set tighter URL-specific limits for every resource that accepts a message header and body.

2
  • You can not set the url level content length This is the security reason Check this link here is the full details stackoverflow.com/questions/812925/… Aug 27, 2020 at 12:26
  • I don't recommend you to use url level. If you want to set the Content Length, then you can also set it in iis. double click Request Filtering and on the rightest panel click Edit Feature Settings. In Request Limits section you can set the maxAllowedContentLength.
    – samwu
    Aug 28, 2020 at 7:39

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.