The reason you are getting the InvalidOperationException on the Post is due to the fact that there is not a "text/plain" media type formatter in the framework. You will need to create a custom MediaTypeFormatter that understands this content-type.
Also, make sure to add the new formatter to your HttpConfiguration formatters collection during application startup.
davebettin
Member
313 Points
94 Posts
Re: Model binding on POST
Mar 04, 2012 01:48 AM|LINK
The reason you are getting the InvalidOperationException on the Post is due to the fact that there is not a "text/plain" media type formatter in the framework. You will need to create a custom MediaTypeFormatter that understands this content-type. Also, make sure to add the new formatter to your HttpConfiguration formatters collection during application startup.
Cheers,
Dave
@dbettin