Reputation: 161
I have this controller action (please see below) which returns a PDF report/file. I'm using the local URL below to call on this particular action.
http://localhost:35201/Reports/TimeCards/f6c17d29-93fa-4a34-9aa5-d95371253d0d
For some reason, the action is being called twice. Doubling the resource consumption on the server. On the client side, I see two calls on the chrome developer tools. The first call finishes with a 200 and immediately another call is made and marked as cancelled, but the PDF rendering still happens on the server on the second call.
I would like to eliminate the second call to save resources. Has anyone gone through something similar? I would appreciate any help.
public ActionResult TimeCards(Guid id)
{
//id = BatchId
//init variables
string sigFile = string.Empty;
Guid company = GetCompanyId();
//get PayrollBatch record
PayrollBatch batch = this.payrollService.GetBatch(id);
//render report this returns a pdf file
byte[] renderedBytes = this.reportService.ProcessTimeCardReport(id, company, this);
return File(renderedBytes, "application/pdf");
}
Upvotes: 0
Views: 935
Reputation: 9294
It looks like an issue in Chrome: https://bugs.chromium.org/p/chromium/issues/detail?id=587709
Upvotes: 2