.Net in a web browser transfer for a long time generated file?

The server will generate the report. Depending on the amount of data can be generated and 20-30 minutes. How to generate, save, and give the link to the file? Not storing it in the server file system.
July 2nd 19 at 17:44
1 answer
July 2nd 19 at 17:46
To begin writing in Response.OutputStream anything.

For example, with this approach the client starts receiving the file immediately without waiting for the completion of the archive.
Response.ContentType = "application/zip";
Response.AppendHeader("Content-Disposition", "attachment; filename=qqq.zip");
zipFile.Save(Response.OutputStream);

Response.End();


Note that the worker thread will be busy and at the same time a lot of files this way you will not give up.

Find more questions by tags .NETWeb Development