我的rest wcf 服务工作正常。 除了在某些情况下它会抛出错误的请求。
在某些搜索和检查中,似乎当 url 具有较长参数时。(有时 url 长度超过 1000)。它不会命中服务并立即抛出错误请求。
http://testservice/Service.svc/endpoint/get/1/2/longparameter
遇到这种情况我该如何解决?
最佳答案
我遇到了类似的问题,感谢 this answer能够通过添加以下内容来解决该问题:
<system.web>
<httpRuntime maxUrlLength="500" />
</system.web>
这对我有用,但就你而言,听起来你需要将其设置得更高。
关于c# - Wcf 休息服务 URL 最大长度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25547028/