IIS 7 and Above
Not able to accept JSON data as JSON data
Last post Jul 05, 2018 02:08 AM by deepakpanchal10
Jul 02, 2018 07:10 PM|dkeifer3278|LINK
I have an IIS (windows 10) operation designed to parse through a JSON string.
When calling it from Postman with the JSON data formatted as "text/plain" it works fine.
However, when calling it with the JSON data formatted as "application/json" it does not.
The error I am getting is "Incoming message for operation . . . contains an unrecognized http body format value 'Json'. The expected body format value is 'Raw'. This can be because a WebContentTypeMapper has not been configured on the binding. See the documentation
of WebContentTypeMapper for more details.".
Our 3rd-party customer that will eventually be calling this operation is unable to send that data as "text/plain" so I must get my web service to be able to handle JSON-formatted data.
What do I need to do in my web service or IIS settings to get this to work?
Thanks in advance.
Jul 03, 2018 01:43 AM|deepakpanchal10|LINK
Are you using WCF or REST API?
I find that this error can be caused with WCF or REST API.
I did not get any related articles that points that this is IIS issue.
If you are using WCF or REST API then I think that issue is more related with it and is not related with IIS.
You need to check your code to find the issue and find the solution to resolve it.
Below links may help you to get some information regarding this issue.
JSON and WebInvoke
Struggling trying to process JSON formatted request
If you also think that the issue is more related with WCF then below is the best suitable forum to post this issue.
Windows Communication Foundation, Serialization, and Networking Forum
I suggest you to close this thread, Before creating a new thread in WCF forum.
If you have any further questions then let us know about it. We will try to provide further suggestions.
Thanks for your understanding.
Jul 03, 2018 09:44 PM|dkeifer3278|LINK
I am using WCF.
Jul 04, 2018 07:33 AM|deepakpanchal10|LINK
Hi dkeifer3278 ,
From your last post, I can see that you are using WCF and your issue is related with WCF.
So I suggest you to post your issue in WCF forum to get better support.
I suggest you to close this thread, before creating a new thread in WCF forum.
Jul 04, 2018 06:15 PM|dkeifer3278|LINK
Thanks. I have posted it in a different forum.
How do I close this thread?
Jul 05, 2018 02:08 AM|deepakpanchal10|LINK
Hi dkeifer3278,To close this thread, you can mark the helpful suggestion as an answer.
Let us know, If you have any difficulty to perform this operation.
We will try to provide further suggestions for that.