{"$id":"1","ExceptionType":"System.InvalidOperationException","Message":"No MediaTypeFormatter is available to read an object of type 'Produc' from content with media type ''undefined''.","StackTrace":" at System.Net.Http.HttpContentExtensions.ReadAsAsync[T](HttpContent
content, Type type, IEnumerable`1 formatters, IFormatterLogger formatterLogger)\r\n at System.Web.Http.Mod
jlserrano
Member
4 Points
4 Posts
how to resolve mediaformatter webapi and MVC4RC
Jul 27, 2012 11:43 AM|LINK
Hello how to resolve the issue with Update and Create with MVC4 RC
i Mean always when you made Update o new actions (pleae refer to http://www.asp.net/web-api/overview/creating-web-apis/using-web-api-with-entity-framework/using-web-api-with-entity-framework,-part-5) you get:
{"$id":"1","ExceptionType":"System.InvalidOperationException","Message":"No MediaTypeFormatter is available to read an object of type 'Produc' from content with media type ''undefined''.","StackTrace":" at System.Net.Http.HttpContentExtensions.ReadAsAsync[T](HttpContent content, Type type, IEnumerable`1 formatters, IFormatterLogger formatterLogger)\r\n at System.Web.Http.Mod
enviroment:
MVC4 RC knockout 2.0 net 4.0
Thank you in advance
Thank you very much
jlserrano
Member
4 Points
4 Posts
Re: how to resolve mediaformatter webapi and MVC4RC
Jul 30, 2012 07:14 AM|LINK
UFFF,
It's my mistake have to be carefull in the javascript section to pass the data product as: data:product
thanks