简体   繁体   中英

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. First of all, what the wcf does: it just saves objects in a database they dont have access. That's all. I've tested the wcf saving up to 100/150 objects. 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". 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.

Maybe this can help, but i think they call the web service from a web api and not directly from their webpage/app.

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. This is normally caused by the client performing an HTTP GET rather than a 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM