Change max url request filtering in iss 7 using web.config

HTTP requests that are processed by the Web server.

<system.webServer>
<security>
   <requestFiltering>
      <requestLimits maxUrl="40960" maxQueryString="2097151" />
   </requestFiltering>
</security>
</system.webServer>

HTTP run-time settings
<system.web>
    <!-- 40MB = 40960, 100MB = 102400 -->
    <httpRuntime maxUrlLength="40960" maxQueryStringLength="2097151" maxRequestLength="40960" />
</system.web>

maxUrlLength
Optional Int32 attribute.
The maximum length of the URL, in number of characters. The default is 260.
The value of the MaxUrlLength property can be any integer, zero or larger.
If the length of the request URL (which is the value of the Path property) exceeds the configured size limit, ASP.NET returns an HTTP 400 (Bad Request) status code.

maxQueryStringLength
Optional Int32 attribute.
The maximum length of the query string, in number of characters. The default is 2048.
The value of the MaxQueryStringLength property can be any integer, zero or larger. If the length of a query string exceeds the size limit, ASP.NET returns an HTTP 400 (Bad Request) status code.
There is also an IIS setting that controls query string length. See the maxQueryString attribute in Request Limits

maxRequestLength
Indicates the maximum file upload size supported by ASP.NET. This limit can be used to prevent denial of service attacks caused by users posting large files to the server. The size specified is in kilobytes. The default is 4096 KB (4 MB).
Change max url request filtering in iss 7 using web.config Change max url request filtering in iss 7 using web.config Reviewed by Bhaumik Patel on 8:32 PM Rating: 5