File Size Goes to Zero when Returning FileStreamResult from MVC Controller File Size Goes to Zero when Returning FileStreamResult from MVC Controller azure azure

File Size Goes to Zero when Returning FileStreamResult from MVC Controller


Your memorystream position after DownloadRangeToStreamAsync will be on the last byte. Set it back to the begining before you return it.

stream.Seek(0,0)