简体   繁体   English

调用wcf Web服务时出现错误(414)请求URI太长

[英]Error (414) Request-URI Too Long when calling a wcf web service

I'm developing a wcf web service for one of our clients, and they reported an error I do not understand at all. 我正在为我们的一位客户开发wcf Web服务,他们报告了一个我根本不理解的错误。 First of all, what the wcf does: it just saves objects in a database they dont have access. 首先,wcf的作用是:它将对象仅保存在他们无权访问的数据库中。 That's all. 就这样。 I've tested the wcf saving up to 100/150 objects. 我已经测试过wcf最多可以保存100/150个对象。 But, when they call the web service, they cant even save 50 because it throws the exception "The remote server returned an error: (414) Request-URI Too Long". 但是,当他们调用Web服务时,他们甚至无法保存50,因为它抛出异常“远程服务器返回错误:(414)请求URI太长”。 I understand that each browser has a limit to the size of the url, but i really dont understand WHY, when calling the web service, they're having this problem. 我知道每种浏览器对URL的大小都有限制,但是我真的不明白为什么,当调用Web服务时,他们遇到了这个问题。

Maybe this can help, but i think they call the web service from a web api and not directly from their webpage/app. 也许这可以有所帮助,但我认为他们是通过Web API而不是直接从其网页/应用程序调用Web服务。

If anyone has an idea that could help me, I would be very grateful. 如果有人对我有帮助,我将不胜感激。

This is nothing to do with their client per se. 这与他们的客户本身无关。 The 414 error is coming from your server because the Request-URI that they are passing it is too long. 414错误来自您的服务器,因为它们传递的Request-URI太长。 This is normally caused by the client performing an HTTP GET rather than a POST. 这通常是由客户端执行HTTP GET而不是POST引起的。 Thus the querystring becomes too large when too many parameters are passed within it. 因此,当在其中传递太多参数时,查询字符串将变得太大。 Check that they are using a POST as this service clearly needs to be exposed using that verb. 检查他们是否正在使用POST,因为显然需要使用该动词来公开此服务。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 414(请求 URI 太长) - 414 (Request-URI Too Long) 远程服务器返回错误:(414)请求URI太大 - The remote server returned an error: (414) Request-URI Too Large Google Translate API如何使用.NET库翻译大文本((414)Request-URI太大) - Google Translate API How to translate big text ((414) Request-URI Too Large) with .NET library Yahoo Finance API:远程服务器返回错误:(414)请求URI太长 - Yahoo Finance API : The remote server returned an error: (414) Request URI Too Long HTTP错误414。使用ActionLink的请求URL太长 - HTTP Error 414. The request URL is too long using ActionLink 请求 URL 太长 HTTP 错误 414。请求 URL 太长 - Request URL Too Long HTTP Error 414. The request URL is too long WebRequest在ASP.NET应用程序中失败,“414 Request URI太长” - WebRequest fails with “414 Request URI too long” in ASP.NET application 414-请求的uri太长-网址长度为70个字符 - 414 - The requested uri is too long - the url is 70 characters long 以编程方式将事件添加到Google日历-请求URI太大 - Programmatically add an event to Google Calendar - Request-URI Too Large HTTP错误414.请求URL太长。 asp.net - HTTP Error 414. The request URL is too long. asp.net
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM