I am trying to get XML result in Web API but I get the following error:
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/xml; charset=utf-8'.
.
.
.
there is no problem in getting result in JSON format. I specifically need result in XML.
Santi Santosh MahapatraPosted Jan 4, 2015, 4:02 AM
at your Global, provide following Application_Start
GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;