Saturday, January 21, 2012

There is a 2048 character cap on the length of urls in MVC4 apps.

Put <httpRuntime maxQueryStringLength="8000" /> in the <system.web> portion of Web.config to deal with this error message in an ASP.NET MVC4 project:

The length of the query string for this request exceeds the configured maxQueryStringLength value.

 
 

As there is a 2,083 character limit for the URL line in Internet Explorer this sort of restraint makes sense.

No comments:

Post a Comment