I`m using Asp Net Mvc 4 Web Api and I need to make request with querystring length > 2000 symbols
I`ve allready set maxQueryStringLength="10000" parameter in web.config. Everything works well on my developer machine On IIS it works only if querystring < 2000 symbols, but if querystring > 2000 symbols I get an error: 404 Not Found
Any considerations?
Late for the party but, here is the three points we have changed to get rid of it:
In web.config
, add httpRuntime
tag the attribute maxQueryStringLength
:
<system.web>
<httpRuntime maxQueryStringLength="32768" />
</system.web>
Again in web.config
, add requestLimits
tag the attribute maxQueryString
:
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="32768" />
</requestFiltering>
</security>
<system.webServer>
If still no cure, from the IIS config, in ISAPI Filters
section, remove the UrlScan
filter. This last one did the trick in my case. But, beware, it brings a security risk.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With