2

I´m trying to stream a video using PushStreamContent, but some seconds after the video starts playing the browser gives me a net::ERR_CONNECTION_RESET ( Error )

Frontend : using tag to call a webapi method that uses a action that sends a buffer with parts of a video file

Hope that i could explain my problem.

Thanks in advance.

brunof.89
  • 150
  • 1
  • 7

1 Answers1

0

If you are using Entity Framework Core, you may have a looping object graph. Since EF Core does not support lazy loading, your serializer might be stuck in an infinite loop trying to serialize your object graph.

Replace the services.AddMvc() line in your Startup.cs with this:

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