ASP.NET MVC serving files using return File and default Content
I am amazed with the speed differences at which when you place the file in
Content folder and let user download it, and the speed when you send the
file with
This result in 100KB/s in my dedicated server with 2 open section public
FilePathResult GetFile() { return File("c:\a.pdf",
"application/octet-stream"); }
When I play the same file in "WebRoot\Content\a.pdf" and download it, it
is capable to open 10 sections and the speed is 1000KB/s
The speed is 10 times differences. Can anybody help me on how to send file
to user with max speed? I tried various method, like above (return File)
and also using Response.Write using loop and buffer and detecting HTTP
Header that request partial content, and the FDM (Free Download Manager)
software also by default open arounds only 3 sections. But the download
manager acts strange when the file is served via "Content/" folder which
it is capable to open 10 sections with no configuration changes.
No comments:
Post a Comment