The HttpResponse.WriteFile method does not work very well with large files since it reads the whole file to memory at once. This may crash the ASP.NET worker process if the file is too big.
This helper class uses buffers and continuously checks if the client is connected before it sends any output.
This helper class uses buffers and continuously checks if the client is connected before it sends any output.