1
Answer

Web API XML Serialization

Nick Cimer

Nick Cimer

9y
693
1
I am trying to get XML result in Web API but I get the following error:
 
<Error>
<Message>An error has occurred.</Message>
<ExceptionMessage>
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/xml; charset=utf-8'.
</ExceptionMessage>
<ExceptionType>System.InvalidOperationException</ExceptionType>
<StackTrace/>
.
.
.
 
 
there is no problem in getting result in JSON format. I specifically need result in XML.
 
Answers (1)