0

We have a IIS 8 web server on which Web API is deployed. We have a front end application written in extJS. When the application accessed, it makes sever API calls to the server and many of these calls return success except one specific API call. Chrome says request status as cancelled (ERR_CONNECTION_RESET), and I am not able to figure out how to troubleshoot and fix this error. I have checked many places online but I could not get much help.

Please help.

dotcoder
  • 2,828
  • 10
  • 34
  • 50

1 Answers1

0

Are you using Entity Framework Core? If so, you may have an object graph loop in your many-to-many relationships as EFCore does not support lazy loading at this time.

If so, you can configure your serializer to not follow graph loops.

In your Startup.cs file, replace the services.AddMvc() line with this:

services.AddMvc()
    .AddJsonOptions(options => options.SerializerSettings.ReferenceLoopHandling = Newtonsoft.Json.ReferenceLoopHandling.Ignore);
birwin
  • 2,524
  • 2
  • 21
  • 41