1
Hello I have web application that provides a download of contents of the database in excel format, I am using in my controller a method of type Fileresult. Below abridged version of the code.
Simple download link
<div>
<a href="@Url.Action("DownloadExcel","DeliveryReport")">Download Excel</a>
</div>
Function of the controller
public FileResult DownloadExcel(DeliveryReportViewModel model)
{
var dto = Service.GetDto();
byte[] filecontent = ConverToExcel(dto);
return File(filecontent, ExcelExportHelper.ExcelContentType,
ExcelExportHelper.GenerateFileName(Resources.DeliveryReport));
}
It works perfectly until certain amount of records, the problem is when there is a large volume of data. The request time does not last more than one minute so when it exceeds this waiting time an error is returned to me even with the controller giving continuity to the data process. How could I leave the request lasting as long as it took to download the file? Or who knows leaving this process in the background while the user continues to use the system?