# Change JSON settings in Hangfire .net4

**URL:** <https://discuss.hangfire.io/t/change-json-settings-in-hangfire-net4/1077>\
**Category:** question\
**Created:** [June 18, 2015, 8:16am UTC](https://discuss.hangfire.io/t/change-json-settings-in-hangfire-net4/1077 "2015-06-18T08:16:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Xepos](https://avatars.discourse-cdn.com/v4/letter/x/d78d45/32.png) [@Xepos](https://discuss.hangfire.io/u/Xepos)\
**Post date:** [June 18, 2015, 8:16am UTC](https://discuss.hangfire.io/t/change-json-settings-in-hangfire-net4/1077/1 "2015-06-18T08:16:37Z")

</div>

When I’m trying to setup a recurringjob. I’m getting a JsonSerializationException: Self referencing loop detected with type.  
After some Googling I found the solution to change the JsonSerializationSettings.  
I did this with the following line: System.Web.Http.GlobalConfiguration.Configuration.Formatters.JsonFormatter.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore;

But I keep getting the same error. Maybe is this because of the settings not getting applied to Hangfire?

Or maybe is it because I’m using Hangfire .net4?

Found the answer that I needed to change JsonConvert.DefaultSettings.
