How to Fix Maxquerystringlength Exception

Problem: Unrecognized configuration section httpRuntime. The length of the query string for this request exceeds the configured maxQueryStringLength value. firefox In case you experience the same error, it's because of the new feature available for mvc3 dotnet. Now asp is enforcing a maximum query length of (2K+ by default) which can be overriden in web.config as follow (Add httpRuntime just before compilation tag):

    
    
    

Also you might need to change request limit length:
<system.webServer>
    <security>
      <requestFiltering>
        <requestLimits maxQueryString="32767"/>
      </requestFiltering>
    </security>
</system.webServer>
This new tag is explained here: http://msdn.microsoft.com/en-us/library/e1f13641%28VS.71%29.aspx

2 تعليقات

أحدث أقدم
NERV Open Source

Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.

Explore NERV on GitHub →