What is the best practice for transferring huge binaries using ASP.NET?

Consider an ASP.NET page with this code:

while (read)
{
   Response.OutputStream.Write(buffer, 0, buffer.Length);
   Response.Flush();
}

The application must be tuned for high performance and handle thousands of simultaneous requests, and the main goal is to transfer a huge binary file to clients over high-speed connections. I can do the job with the help of ASP.NET pagewith HTTP Handler, IHttpAsyncHandler, ISAPI filterand ...

The question is, what is the best choice for this purpose?

+5
source share
1 answer

/, Async. ( ) Stream.

.

FileStream Constructor -

, , , System.Net.Sockets .

+2

All Articles