I am streaming data from server to client for download using filestream.write. In that case what is happening is that I am able to download the file but it does not
filestream.write
Change:
return RedirectToAction("Index");
to:
return File(fs, "your/content-type", "filename");
And move the return statement to inside your using statement.