Hi Im developing a web application its working fine but yesterday i had a problem when i click a link it gives error
The length of the query string for this request exceeds the configured maxQueryStringLength value.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The length of the query string for this request exceeds the configured maxQueryStringLength value.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[HttpException (0x80004005): The length of the query string for this request exceeds the configured maxQueryStringLength value.]
System.Web.HttpRequest.ValidateInputIfRequiredByConfig() +9672501
System.Web.PipelineStepManager.ValidateHelper(HttpContext context) +53
as you can see i m not giving any querystring and how i prevent the querystring to autogenerate im using asp dotnet4 Ajaxcontroltoolkit and using updatepanel. Any suggestions?????
After fighting for one whole day i randomly found a solution I changed
<form id="form1" method="GET" runat="server">
to
<form id="form1" runat="server"> <!--(this solved my problem.) -->
I dont know why method="Get" generate long querystring (when i click any link in my page) which was giving error The length of the query string for this request exceeds the configured maxQueryStringLength value
OTHER TIPS
The query string you are passing in the url is longer than 2048 which is the default value for maxQueryStringLength. You have to set a bigger value in the Web.config file (maxQueryStringLength)
for example : "<httpRuntime maxQueryStringLength="16384" />"
Here's a link for more info