You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.
If one tries to return an image in a FileStreamResult, the application will throw an exception along the lines of: InvalidOperationException: Response Content-Length mismatch: too few bytes written (0 of 1234567)
I get the same exception one out of two requests. It only happens when I deploy my application to Azure app service. Unfortunately, I can't reproduce it locally.
Hi there,
If one tries to return an image in a FileStreamResult, the application will throw an exception along the lines of:
InvalidOperationException: Response Content-Length mismatch: too few bytes written (0 of 1234567)
My code was as follows:
However, if I changed it to the following, the image is returned without complaint:
It appears that doing the reading manually fixes the issue.
Thanks!
The text was updated successfully, but these errors were encountered: