我有一个webHttpBinding
使用 ASP.NET 4/IIS 8的 WCF 服务(通过GET
. 但是,今天我需要实现一个发送大查询字符串的方法(大约 3000 个字符,没有那么长,但比我一直使用的要长)。我调用了该服务并立即收到 404 错误,甚至没有在我的调试机器上进入我的代码。我首先想到的是最大查询字符串长度限制。我已将此添加到我的 web.config 中:
<system.webServer>
<directoryBrowse enabled="true" />
<security>
<requestFiltering>
<requestLimits maxQueryString="8000"></requestLimits>
</requestFiltering>
</security>
</system.webServer>
现在,当我调用该服务时,我收到了这个服务器错误:The length of the query string for this request exceeds the configured maxQueryStringLength value.
很奇怪,我已经尝试了其他值,例如200000
, 超过我的查询字符串和 URL,大约 3000 个字符。我错过了什么吗?