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
<security> <requestFiltering> <requestLimits maxQueryString="32768"/> </requestFiltering> </security>
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
<httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/>
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!