You are not using return View(), but something like:
return File(myMemoryStream, // zipped data
System.Net.Mime.MediaTypeNames.Application.Zip, // "application/zip"
"default.zip"); // suggested download name
Several overloads are available.
Helper functions Controller.File()and Controller.View()support both types of return data obtained from ActionResult.
source
share