Self referencing loop detected – Getting back data from WebApi to the browser
Is this because the Question has Answers and the Answers have a reference back to Question? Yes. It cannot be serialized. EDIT: See Tallmaris’s answer and OttO’s comment as it is simpler and can be set globally. GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore; Old Answer: Project the EF object Question to your own intermediate or DataTransferObject. This Dto … Read more