ASP.NET Web API doesn't play nice with Entity Framework's dynamic proxy classes.

I have a Web API project which leverages an SQL database through Entity Framework. Pretty standard Microsoft technology stacks I've been using for years. When using EF I've historically disabled lazy loading and proxy generation due to lack of need for those features. This project I left them enabled. I quickly started getting serialization exceptions from my controller. A little googling and I found this is a known issue with the use of EF dynamic proxies and serialization (specifically JSON). Infinite reference loops can and often do appear in EF entities. Take the following example.

public class Parent  
{ 
    public ICollection<Child> Children { get; set; } 
} 

public class Child  
{ 
    public Parent Parent { get; set; } 
} 

A Parent has references to many Children and each Child has a reference to the Parent. An infinite loop occurs when the serializer attempts to fully resolve either of these objects.

As it turns our there are a number of ways to "fix" this issue many of which are excellently documented here by one Mr. Hongye Sun. For my situation tonight it was by far the easiest to simply disable dynamic proxy generation in my DbContext.