Home >Backend Development >C++ >How to Fix HTTP Error 404.15: Increasing Query String Length Limits in web.config?

How to Fix HTTP Error 404.15: Increasing Query String Length Limits in web.config?

DDD
DDDOriginal
2024-12-30 14:26:11961browse

How to Fix HTTP Error 404.15: Increasing Query String Length Limits in web.config?

How to Allow Requests of Any Length in web.config

When building a website involving file creation based on textarea content, developers may encounter an HTTP error 404.15 indicating a restricted query string length. To overcome this obstacle, web.config can be configured to allow requests of any size.

In the web.config file, add the following code under :

<security>
    <requestFiltering>
        <requestLimits maxQueryString="32768"/>
    </requestFiltering>
</security>

The "maxQueryString" attribute sets the maximum length of the query string. The value provided here (32768) is an example; it can be adjusted as needed.

Additionally, it may be necessary to include the following code under :

<httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/>

These configurations allow for the processing of larger requests and enable the creation of client-side files from textarea values. The specific values specified for maxQueryStringLength and maxUrlLength can be modified to suit the requirements of the application.

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

Statement:
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