Home > Backend Development > C++ > How to Override Request Length Limits in Web.config to Fix HTTP Error 404.15?

How to Override Request Length Limits in Web.config to Fix HTTP Error 404.15?

Susan Sarandon
Release: 2024-12-30 14:05:11
Original
710 people have browsed it

How to Override Request Length Limits in Web.config to Fix HTTP Error 404.15?

Overriding Request Length Limitations in Web.config

When receiving extensive requests, you may encounter an HTTP Error 404.15, indicating that the query string length exceeds the allowed limit. To resolve this issue, modifications to the web.config settings are necessary.

To configure Web.config for handling requests of any length, follow these steps:

  1. Locate the web.config file within the web application directory.
  2. Add the following code under the section:
<security>
    <requestFiltering>
        <requestLimits maxQueryString="32768" />
    </requestFiltering>
</security>
Copy after login

This code overrides the default request filtering limits and allows requests with query strings up to 32,768 characters in length.

  1. Next, add the following code under the section:
<httpRuntime maxQueryStringLength="32768" maxUrlLength="65536" />
Copy after login

This code extends the maximum query string length and URL length to 32,768 and 65,536 characters, respectively.

These modifications to the web.config configuration allow the server to accept and process requests of any length, resolving the HTTP Error 404.15. It's important to note that the numerical values provided are examples and can be adjusted as needed to accommodate your specific requirements.

The above is the detailed content of How to Override Request Length Limits in Web.config to Fix HTTP Error 404.15?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template