when I try to get data from my API on IIS this error is shown
The 'ObjectContent`1' type failed to serialize the response body for content type 'application/json; charset=utf-8'."
this error is shown in my localhost also but when I wrote this code
var json = config.Formatters.JsonFormatter;
json.SerializerSettings.PreserveReferencesHandling = Newtonsoft.Json.PreserveReferencesHandling.Objects;
config.Formatters.Remove(config.Formatters.XmlFormatter);
the error is gone and the localhost is working fine right now,
no data back just error
data back and everything is fine
What am I missing?