Solution for Query String Too Long Error

Recently I came across an error related to the query string too long in a website while navigating between the pages in the website.

Below are the errors I saw.


Request URL Too Long
HTTP Error 414. The request URL is too long.

Another error:

HTTP Error 404.15 – Not Found
The request filtering module is configured to deny a request where the query string is too long.

These errors are due to long query string. By default the maximum query string length(maxQueryString) accepted by IIS is 2048. IIS throws this error for any query string in the URL exceeding this limit. It’s always a good practice to avoid long query strings in a ASP.NET websites.

Quick Solution For Query String Too Long Error

In case if needed, you can change the IIS settings to accept long query strings. Microsoft has a very good documentation on this settings. Try the settings to avoid the “query string too long” error in your browser. This workaround is applicable for IIS 6.0, 7.0 and 7.5. Another workaround is to change the maxQueryString and the maxUrl value for the website. Read more about Changing maxQueryString and maxUrl.

Best Practice


  • Details on Request Limits <requestLimits> here.


2 thoughts on “Solution for Query String Too Long Error”

Leave your thoughts...

This site uses Akismet to reduce spam. Learn how your comment data is processed.