Answer the question
In order to leave comments, you need to log in
.Net how to send a long generated file to a web browser?
The report is generated on the server. Depending on the amount of data, 20-30 minutes can be generated. How can I generate it, save it, and give a link to this file? At the same time, it is not saved in the server file system.
Answer the question
In order to leave comments, you need to log in
Start writing to Response.OutputStream at least something.
For example, with this approach, the client starts receiving the file immediately without waiting for the end of the archive formation.
Response.ContentType = "application/zip";
Response.AppendHeader("Content-Disposition", "attachment; filename=qqq.zip");
zipFile.Save(Response.OutputStream);
Response.End();
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question