Skip to content
Advertisement

File download using BinaryFileResponse works for a while, then fails

I use this function to download MP3 files from my server; The files are a few megs large, anywhere between 1 and 10 megs. It works very well however it stops working after a while, it then permanently raises an error (catch section) whenever we use the function, this until I restart the web server. As soon as I restart it, it resumes behaving correctly. The web server is OpenLiteSpeed 1.4.

Kindly advise if I am using the BinaryFileResponse function correctly or not?

JavaScript

Advertisement

Answer

I searched for hours but couldn’t find an answer so I then decided to take a totally different approach which works fine:

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement