Solution for Query String Too Long Error

I came across an error related to the long query string in a website.

Request URL Too Long

HTTP Error 414. The request URL is too long.

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 sting.

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 websites.

But in case if needed we 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.

See this article for few of the best practices you can follow while generating query string in .Net web applications.



2 comments for “Solution for Query String Too Long Error

  1. suresh
    July 1, 2015 at 8:59 pm

    The remote server returned an error: (414) Request-URI Too Long.

Leave your thoughts...