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 Comments

  1. Nice to be visiting your blog again, it has been months for me. Well this article that i've been waited for so long.

    ReplyDelete
  2. This did not resolve the issue but returned a 500 error instead. Thoughts?

    ReplyDelete

Post a Comment

Post a Comment

Previous Post Next Post
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.