Restful WCF POST issue with application/json content type request

坚强是说给别人听的谎言 提交于 2019-12-04 18:19:50

The problem is that to use the raw programming model (using a Stream parameter), you'll need to tell WCF to not try to understand the request as JSON, instead just pass the raw request body to the parameter. You can do that using a WebContentTypeMapper. The post at http://blogs.msdn.com/b/carlosfigueira/archive/2008/04/17/wcf-raw-programming-model-receiving-arbitrary-data.aspx shows how this can be done. The solution with the factory works because it does that when it creates the endpoint.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!