Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Mar 15, 2012 08:51 PM|LINK
In the constructor of a custom formatter I add:
this.SupportedMediaTypes.Add(new MediaTypeHeaderValue("application/x-www-form-urlencoded; charset=utf-8"));
This gives an exception that the format is invalid. So I change it to:
But now it seems that the custom formatter is not getting called. What is the format that I could set so that the content type will be recognized? It seems that another formatter is being called. I have set Accept to XML so maybe the XML serializer is called but it only serializes partially? I have set a breakpoint in my custom formatter and not only is this breakpoint not getting hit but values that I set in the custom formatter are not showing up in the controller.