Data Browser - Viewing Site  Sector 23 Code Bank Logged in as:  Guest  




           


maxQueryStringLength and Internet Explorer
If you have a URL with too many query parameters, you will get an exception in .NET on a production server (I don't believe this results in an error on localhost):
The length of the query string for this request exceeds the configured maxQueryStringLength value.

The obvious solution seems to be to update the web.config file and add really large value to httpRuntime/maxQueryStringLength.

However, this doesn't actually work. Users of Internet Explorer (IE) will have the URL truncated at 2048 characters regardless of your setting.
It is also a potential invitation to a Denial of Service attack.

So, leave the maxQueryStringLength alone, and find a different way to pass data from one page to another. You could use:
Form Post to post the data via javascript/html (this is an ideal solution but somewhat complex/unwieldy in .NET)
Session, Cookie, Singleton Dictionary, Database, or Cache Variable to store the data between the click of a URL button and the page load of that page

Created By: amos 4/2/2013 2:47:28 PM
Updated: 4/2/2013 2:50:01 PM