我有一个简单的WCF服务,有几种方法.我使用POSTMAN来测试它们.所有的GET工作正常,但由于某种原因,我无法发布.
当我尝试POST时:
{"participants":"BLA"}
Run Code Online (Sandbox Code Playgroud)
到本地主机(以ParticipantsStatusService.svc/init为后缀,以及从不同的机器到部署服务的机器)我得到:
"400 Bad Request. The request cannot be fulfilled due to bad syntax" and the in the preview:
"
Run Code Online (Sandbox Code Playgroud)
请求错误
The server encountered an error processing the request. The exception message is 'The incoming message has an unexpected message format 'Raw'. The expected message formats for the operation are 'Xml', 'Json'. This can be because a WebContentTypeMapper has not been configured on the binding. See the documentation of WebContentTypeMapper for more details.'. See server logs for more …Run Code Online (Sandbox Code Playgroud)