Home > Backend Development > C++ > How to Fix 'HTTP Error 404.15 - Not Found' Due to Long Query Strings in Web.config?

How to Fix 'HTTP Error 404.15 - Not Found' Due to Long Query Strings in Web.config?

Patricia Arquette
Release: 2025-01-03 01:04:39
Original
333 people have browsed it

How to Fix

Extending Web.config Parameters to Handle Excessive Request Lengths

As you encounter the "HTTP Error 404.15 - Not Found" issue while attempting to create files client-side, it might be attributed to the length of the query string exceeding the request filtering module's threshold. Here's how you can configure your web.config settings to resolve this:

Configuring Web.config

To allow requests of any length, add the following lines to your web.config file within the section:

<security>
    <requestFiltering>
        <requestLimits maxQueryString="32768"/>
    </requestFiltering>
</security>
Copy after login

This setting adjusts the maximum allowed query string length to 32768 bytes. You can specify a different value if necessary.

Additional Web.config Modifications

In some scenarios, you might also need to modify the section in your web.config file, adding the following lines:

<httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/>
Copy after login

These settings configure ASP.NET's maximum query string and URL lengths.

Alternative Methods

If modifying the web.config settings doesn't help, consider alternative methods to generate files client-side without using the filesystem or ActiveX objects. One such method is utilizing HTML5 APIs, which provide cross-platform compatibility and do not require configuration changes.

The above is the detailed content of How to Fix 'HTTP Error 404.15 - Not Found' Due to Long Query Strings in Web.config?. 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