I have a page in which I execute an ajax call to an ActionResult passing a JSON as data.
Ajax Call:
$.ajax({
contentType: "application/json; charset=utf-8",
traditional: true,
cache: false,
url: "/ContainerPacking/_GenerateShipmentProposal",
type: "post",
data: JSON.stringify({
origin,
containers,
boxes
}),
success: function (result) {
// execute something
}
});
Asp.NET MVC ActionResult:
public ActionResult _GenerateShipmentProposal(int origin, List<int[]> containers, List<Box> boxes, float GapBetweenBoxes = 0.0001f)
{
//execute something;
}
This was working fine, but recently I started noticing a delay (5 ~ 10s) between the ajax call and the ActionResult being triggered.
This happens both in debug mode and in the published page.
Do you guys have any idea what could be happening? Or how to debug/find out what could be happening?
PS.: using .NET Framework 4.7.1 and JQuery 3.5.1
Thanks!