System.OutOfMemoryException on file download
- by frosty
I have an ashx handler with the following code. The idea is to hide the path of the file and prompt a download
context.Response.Clear();
context.Response.AddHeader("Content-Disposition", "attachment; filename=" + fileName);
context.Response.AddHeader("Content-Length", file.Length.ToString());
…