I have a WCF service (over a webHttpBinding
) using ASP.NET 4/IIS 8 and I had no problems communicating with it using JSON with GET
. However, today I needed to implement a method that sends a large query string (about 3000 characters, not that long but longer than that I've been using). I called the service and immediately got a 404 error, without even stepping into my code at my debug machine. The first thing that came to my mind is the maximum query string length limit. I've added this to my web.config:
<system.webServer>
<directoryBrowse enabled="true" />
<security>
<requestFiltering>
<requestLimits maxQueryString="8000"></requestLimits>
</requestFiltering>
</security>
</system.webServer>
Now, I am getting this server error when I call the service: The length of the query string for this request exceeds the configured maxQueryStringLength value.
Weird enough, I've tried other values such as 200000
, way over my query string and URL, which is about 3000 characters. Am I missing something?