Using the PutAsJsonAsync extension method for HttpClient in an asp.net mvc 5 returns a Self referencing loop detected exception.
Here is the calling code:
httpClient.BaseAddress = _uri;
HttpResponseMessage response = await httpClient.PutAsJsonAsync<b>("index/1",b);
response.EnsureSuccessStatusCode();
The object b does have a self reference.
So my question is how do I set SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore
in an asp.net mvc 5 application.