Geeks With Blogs

News ASP.net Forms Justin Hoffman
Justin Hoffman March 2012 Entries
MVC 4 Beta Web Api: Bug with Binding Route Values when using a custom MediaTypeFormatter
During the upgrade of a solution from the Web Api Preview 6 to MVC 4 Beta Web Api, I encountered a bug with a custom MediaTypeFormatter. In the Api controller I had a need to take the posted content object as well as some string identifiers/keys as parameters. The problem I encountered as that if I utilized a custom MediaTypeFormatter, these values came in as NullTake the following Api controller Post: // POST /api/values public HttpResponseMessage<Some... Post(string key, string id, SomeObject ......

Posted On Tuesday, March 6, 2012 9:08 AM

Copyright © Justin Hoffman | Powered by: GeeksWithBlogs.net