How to resolve "The request filtering module is configured to deny a request where the query string is too long"

Programming, error messages and sample code
You can Increase the maximum querystring size by setting the maxQueryString attribute on the requestLimits element in the system.webServer/security/requestFiltering configuration section in your application’s web.config:

<system.webServer>
    <security>
        <requestFiltering>
            <requestLimits maxQueryString="NEW_VALUE_IN_BYTES" />
        </requestFiltering>
    </security>
</system.webServer>