Anyway, I will include the answer here just in case the post disappeared in the future.
public class ReadAsSingleObjectPolicy : IRequestContentReadPolicy { public RequestContentReadKind GetRequestContentReadKind(HttpActionDescriptor actionDescriptor) { return RequestContentReadKind.AsSingleObject; } }
GlobalConfiguration.Configuration.ServiceResolver .SetService(typeof(IRequestContentReadPolicy), new ReadAsSingleObjectPolicy());
3 comments:
Hey, you told that you found the solution, I also tried to implement same things but its giving me internal server error on response.
Could you please describe me how you have solved the issue. I am already trying for this for more than 4 hours now.
The solution I propose doesn't work for you? Or you don't know how to integrate into your solution?
Maybe I couldn't integrate, the base line is that I want things to be solved, if you can guide me though will be great help. I have created the class as you said, and added the entry on global.asax, I am doing anything wrong....
Post a Comment