Quantcast
Channel: Configuration & Scripting
Viewing all articles
Browse latest Browse all 780

WCF won't accept JSON data formatted as JSON

$
0
0

I have an IIS (windows 10) WCF operation designed to parse 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.


Viewing all articles
Browse latest Browse all 780

Trending Articles